Home   Help Search Login Register  

Author Topic: Creating injured people  (Read 3013 times)

0 Members and 1 Guest are viewing this topic.

Pos

  • Guest
Creating injured people
« on: 02 Nov 2005, 15:40:57 »
I've been working on a small mission which includes an area where I want to have injured soldiers but I want them all lie on their backs and a bit bloody too. I know how I can make them bloody by changing the health bar but how can I have them to lie on their backs and make sure they wont get up and move when someone is shooting around them or at them.

I've tried setunitpos but I've only got them to lie on their stomachs

Offline Kendo J

  • Members
  • *
  • Britain Has more varieties of cheese than France
Re:Creating injured people
« Reply #1 on: 02 Nov 2005, 15:52:16 »
you would have to create new animations.

have a look at a loon who you put in cargo into an M113 ambulance. there are two positions (ithink) sitting and lying on the strecher. you might even need to make a whole new addon like a strecher and have the loons "this moveincargo strecher".

otherwise it is impossible.

Kind regards
Kendo

Pos

  • Guest
Re:Creating injured people
« Reply #2 on: 02 Nov 2005, 15:59:38 »
That seems a bit too advanced for me ;/ I guess I'll have to look about and see if i can find any unit addons that look injured otherwise its back to the drawing board for me ;)

thanks for the help m8

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Creating injured people
« Reply #3 on: 02 Nov 2005, 16:02:08 »
Try something like this:



Code: [Select]
{while {canStand _x} do {_x setDammage (getDammage _x) + 0.01}} forEach ArrayofLoons

{if (43 > random 100) then {_x switchmove "CombatDeadVer2"}} forEach ArrayofLoons
{if (30 > random 100) then {_x switchmove "CombatDeadVer3"}} forEach ArrayofLoons

Using different switchmoves will give some variety to their positions.

Not tested
« Last Edit: 02 Nov 2005, 16:02:42 by THobson »

Pos

  • Guest
Re:Creating injured people
« Reply #4 on: 02 Nov 2005, 16:11:04 »
Frogive me if this is a stupid question but how do I implement that code?  :-\

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Creating injured people
« Reply #5 on: 02 Nov 2005, 17:12:48 »
Pos,

Welcome to the forum!

These answers are all moderatly advanced.   What you really need is the switchMove command.    There is a complete listing in the Editors Depot, which also tells you how to use the command.   There is also a demo mission, showing you all of the switchmove animations.    You should find a few that will help you.
Plenty of reviewed ArmA missions for you to play

Offline Kendo J

  • Members
  • *
  • Britain Has more varieties of cheese than France
Re:Creating injured people
« Reply #6 on: 02 Nov 2005, 17:29:13 »
I take back my comments, maybe it is not impossible with out a new addon.

Regards Kendo

p.s. check out this script it is not for alive injured guys but a strecher + delete for dead guys. it has two loons loading dead guys into a truck. it might add a bit of atmosphere to what you are doing because i would love to see some one use it. It is made by alimag!
« Last Edit: 02 Nov 2005, 17:29:28 by Kendo J »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Creating injured people
« Reply #7 on: 02 Nov 2005, 17:29:26 »
Sorry.  You need to a script.  I am afraid I don't have time to describe how to do that at the moment.  Perhaps someone else could help.  I do encourage you to take macguba's advice and look at the switchmoves in his excellent animation demo.

In the meantime:

Create a trigger that activates when anyone is present.  Put some units in the trigger area and copy and paste the following into the Activation field:

{while {canStand _x} do {_x setDammage (getDammage _x) + 0.01}} forEach thislist;
{if (43 > random 100) then {_x switchmove "CombatDeadVer2"}} forEach thislist;  
{if (30 > random 100) then {_x switchmove "CombatDeadVer3"}} forEach thislist

and see what happens.  I hope I got the sytax right.

Pos

  • Guest
Re:Creating injured people
« Reply #8 on: 02 Nov 2005, 18:28:47 »
thanks everyone, The code works and I now have a big list of switchmodes to try, however I wonder if I could trouble you lot with another problem I have? :)

I want my squad to have custom weapons and I know how to do that in the player init field using addweapon etc but it gets kinda messy in there with all the other commands I have. So what i'd like to do is move all the weapon info into one script file. I've been looking on the scripts section in editors depot and found 1 script but it only works on me and only in MP and not SP.

I believe the script is called weaponset1 by dgbs.

Dane

  • Guest
Re:Creating injured people
« Reply #9 on: 02 Nov 2005, 19:01:30 »
Copy and paste into your .sqs file and write in loon's initfield
[this] exec "nameOf.sqs"

Code: [Select]
_dude = _this select 0

removeAllWeapons _dude
_dude addMagazine "magName"
_dude addMagazine "magName"
_dude addMagazine "magName"
_dude addMagazine "magName"
_dude addMagazine "magName"
_dude addWeapon "Binocular"
_dude addWeapon "NVGoggles"
_dude addWeapon "weaponName"
_dude selectWeapon "weaponName"
« Last Edit: 02 Nov 2005, 19:07:19 by DaneDK »

Pos

  • Guest
Re:Creating injured people
« Reply #10 on: 02 Nov 2005, 19:31:57 »
Ok first off I dont know what yous mean by "loons"  ??? but what I did was
create a sqs file and added the following then in the player init field put [this] exec "file.sqs"

Code: [Select]
_dude1 = _this select 0
_dude2 = _this select 0

removeAllWeapons _dude1
removeAllWeapons _dude2

_dude1 addMagazine "magName"
_dude1 addMagazine "magName"
_dude1 addMagazine "magName"
_dude1 addMagazine "magName"
_dude1 addMagazine "magName"
_dude1 addWeapon "Binocular"
_dude1 addWeapon "NVGoggles"
_dude1 addWeapon "weaponName"
_dude1 selectWeapon "weaponName"

_dude2 addMagazine "magName"
_dude2 addMagazine "magName"
_dude2 addMagazine "magName"
_dude2 addMagazine "magName"
_dude2 addMagazine "magName"
_dude2 addWeapon "Binocular"
_dude2 addWeapon "NVGoggles"
_dude2 addWeapon "weaponName"
_dude2 selectWeapon "weaponName"

The code works for my player but not for the other guy and thats what I'm trying to achieve, a sqs file that I can set my entire squads weapon selection.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Creating injured people
« Reply #11 on: 02 Nov 2005, 19:52:24 »
"Loons" is a popular nickname for any unit that you choose to use in your mission.

My suggestion:

1) Name the units that you want to change weapons (example dude1, dude2,...) in the units "name" field.

2) Create an "init.sqs" in your mission folder

Enter code as follows:

Code: [Select]
removeAllWeapons dude1
removeAllWeapons dude2

dude1 addMagazine "magName"
dude1 addMagazine "magName"
dude1 addMagazine "magName"
dude1 addMagazine "magName"
dude1 addMagazine "magName"
dude1 addWeapon "Binocular"
dude1 addWeapon "NVGoggles"
dude1 addWeapon "weaponName"
dude1 selectWeapon "weaponName"

dude2 addMagazine "magName"
dude2 addMagazine "magName"
dude2 addMagazine "magName"
dude2 addMagazine "magName"
dude2 addMagazine "magName"
dude2 addWeapon "Binocular"
dude2 addWeapon "NVGoggles"
dude2 addWeapon "weaponName"
dude2 selectWeapon "weaponName"


As this is only a sample and I do not know what weapons that you want your units to have, you will have to replace "magName" with the proper name of the magazine and "weaponName" with the correct name of the weapon. There are some great references available for the correct names of weapons/magazines in the Editors Depot (I think).

Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Dane

  • Guest
Re:Creating injured people
« Reply #12 on: 02 Nov 2005, 19:59:34 »
Sorry.
Let's say you have 12 soldiers you want to equip with M16 assault rifles.
Then you write in each units init field [this] exec "m16.sqs"

m16.sqs:

Code: [Select]
_dude = _this select 0

removeAllWeapons _dude
_dude addMagazine "m16"
_dude addMagazine "m16"
_dude addMagazine "m16"
_dude addMagazine "m16"
_dude addMagazine "m16"
_dude addWeapon "Binocular"
_dude addWeapon "NVGoggles"
_dude addWeapon "m16"
_dude selectWeapon "m16"

..and 12 soldiers with G36 rifles, just make a new script named g36.sqs

g36.sqs:

Code: [Select]
_dude = _this select 0

removeAllWeapons _dude
_dude addMagazine "g36"
_dude addMagazine "g36"
_dude addMagazine "g36"
_dude addMagazine "g36"
_dude addMagazine "g36"
_dude addWeapon "Binocular"
_dude addWeapon "NVGoggles"
_dude addWeapon "g36"
_dude selectWeapon "g36"


« Last Edit: 02 Nov 2005, 20:03:57 by DaneDK »

Pos

  • Guest
Re:Creating injured people
« Reply #13 on: 02 Nov 2005, 20:22:11 »
ah i c, well thats the problem, I have a 12 man squad with like 3 Laws, 3 MG's, 2 Snipers and some 203 guys and I wanted to set all their weapons in 1 file rather than create a file for each type of soldier.  :(

I tried wadmann said but thats basically the same thing.

Dane

  • Guest
Re:Creating injured people
« Reply #14 on: 02 Nov 2005, 20:26:28 »
Well, you can set weapons in one file like init.sqs, but then you still have to name each unit in the the editor.