OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: loki72 on 14 May 2008, 23:48:19
-
greetings,
is it possible (via script only).. to make a man drive like a car?
i was thinking about being out in the desert and have an addaction command like "sit down" and the unit preform the 'sitdown' animation and stays there... then somehow?? he becomes a car, but only in movement with the keyboard.
it would look like a yogi skimming along the beach on his butt.
thx
-
It is possible, but would require quite a bit of work...first you would need to use playMove or switchMove to get the right animation. Then set up a display event handler for the movement keys. Finally, tie the movement keys into the setPos command to move the unit.
-
Then set up a display event handler for the movement keys. Finally, tie the movement keys into the setPos command to move the unit.
i understand how to do the addaction and animation.. but the last two are new to me.
can you explain a little bit more, then i will have a direction to start digging through the forums.
edit: :dry: i was looking at the BI wiki and i see now what you mean about... a lot of work.
-
The display event handler checks for key up (and or down) events and gives you the ability to run uniqe code for each key.
Then I think constantly updating the units position with setPos is the only way to make the unit move because setVelocity will not work for man class objects that are touchng the ground.