Home   Help Search Login Register  

Author Topic: (Solved) sit in chair  (Read 6597 times)

0 Members and 1 Guest are viewing this topic.

Offline damdam

  • Members
  • *
(Solved) sit in chair
« on: 10 Mar 2010, 09:24:56 »
how can i make a AI to siting in chair and not move!
« Last Edit: 10 Mar 2010, 22:30:14 by damdam »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: AI sit in chair
« Reply #1 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.
I think the "old" ArmA moves 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:
« Last Edit: 10 Mar 2010, 09:48:28 by h- »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: AI sit in chair
« Reply #2 on: 10 Mar 2010, 15:33:30 »
Or use createVehicle to create a "FoldChair_with_Cargo" and use moveInCargo to put the AI in it ;)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: AI sit in chair
« Reply #3 on: 10 Mar 2010, 16:07:35 »
 :D
Well, much better..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline damdam

  • Members
  • *
Re: AI sit in chair
« Reply #4 on: 10 Mar 2010, 22:29:31 »
thx is working