OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Alex on 30 Jan 2004, 21:56:53
-
Hi All,
How Do You Make A Unit Be Prone Or Crouched Via The Editor?
Thanks
Alex
-
crouch is a bit of a problem, but to set a guy prone use this in his init field:
this setunitpos "down"
to only stand up:
this setunitpos "up"
and to react as he wish(prone when under fire):
this setunitpos "auto"
:beat: *Gets Shot* :beat:
-
Thanks But You Don't Know How To Get Him To Crouch
-
Use a playmove animation to make him crouch. Don't put the command in his init field though, they tend not to work there.
-
You cant make him crouch using just the editor on its own.
You could put this in a trigger:
Soldier1 switchmove "Crouch"
But this only fires every 0.5 seconds, which is not enough as he just bobs up and down.
You can do it via the editor, but you will need an addon.
Or you will have to do it via an external looping script, there are plenty of examples here.
-
You cant make him crouch using just the editor on its own.
Why ???
I've dunnit several times...
unit setBehaviour "Combat"; unit setUnitPos "UP"; unit switchMove "crouch"
I got that working, but if the AI is behind an (over-shootable) obstacle it might get back up when firing at NME...
As usual, no guarantees on syntaxes :P
-
It does work to a certain degree, but it wont make him stay crouched. Which is what I assumed Alex was after?
Even without any obstacles in front of him, he will stand up. But its the best non-looping method I've seen yet.
-
It does work to a certain degree, but it wont make him stay crouched.
That's odd since once testing this method the AI stayed crouched all the way trough a fight (well they died before the end but anyhoo), only a machinegunner stood up once he spotted the nme...
Well, maybe it was just a on time delight since I haven't been using that for a while... :-\
-
It Works Absoulutely Perfectly For Me, He Stays Crouched Till He Sees The Enemy And Goes Prone And Starts Firing.