OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: damdam on 10 Mar 2010, 09:24:56

Title: (Solved) sit in chair
Post by: damdam on 10 Mar 2010, 09:24:56
how can i make a AI to siting in chair and not move!
Title: Re: AI sit in chair
Post by: h- on 10 Mar 2010, 09:40:18
Put down a chair, name it to something (like chair_1).
Then either use a script or trigger to set the anim and the soldier on the chair with:
Code: [Select]
unitname switchMove "miles_c0briefing_odpovedel_loop"; unitname setPos (position chairname)unitname of course being the name of the soldier and chairname the name of the chair.

And the code has to be run from a trigger or a script, using the unit's init field doesn't work in this case..
You can find the available animations from Arma2 moves (http://community.bistudio.com/wiki/ArmA2:_Moves).
I think the "old" ArmA moves (http://community.bistudio.com/wiki/Armed_Assault:_Moves_List) work too :dunno:

EDIT:
Note that the soldier will stay in that anim forever, even if it dies.
Dunno if it's because it's a looping anim (judging from the name) so some other anim might be better :dunno:
Title: Re: AI sit in chair
Post by: JamesF1 on 10 Mar 2010, 15:33:30
Or use createVehicle (http://community.bistudio.com/wiki/createVehicle) to create a "FoldChair_with_Cargo" and use moveInCargo (http://community.bistudio.com/wiki/moveInCargo) to put the AI in it ;)
Title: Re: AI sit in chair
Post by: h- on 10 Mar 2010, 16:07:35
 :D
Well, much better..
Title: Re: AI sit in chair
Post by: damdam on 10 Mar 2010, 22:29:31
thx is working