OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: punisher on 30 Aug 2011, 16:04:31
-
Im looking to make ai units start (and stay) in the crouch position in a mission.
I know for ofp it was somthing like: this setbehaviour "combat";this switchmove "combattocrouch"
however this does not work for arma2
-
this setUnitPos "MIDDLE"If you want them to start crouched and stay crouched, use:
this setUnitPos "MIDDLE"; this switchMove "AmovPknlMstpSrasWrflDnon"Hope that helps!
-
setUnitPos "Middle"
this command forces the unit to assume the middle (kneeled) position. To reset the automatic behaviour use
setUnitPos "AUTO"
-
Greetings,
Where does this go exactly? The units Init box?
setUnitPos "Middle"
And this one?
setUnitPos "AUTO"
-
If you want the unit to have this stance from the beginning of the mission then it goes in the unit init field, otherwise you have to create a trigger with a certain condition.
The complete syntax is
this setUnitpos "MIDDLE"
Another suggestion: I understand that you are new to the editing, then I suggest you that, instead of asking "How do I do this or that?" every time you need to do something, you read first some editing guides (there is Mr. Murray editing guide which is very good) and learn something about scripting, otherwise you won't learn anything, and every time you need to do even the easiset thing, you will always have to ask here.
I don't mean to be rude, it's just a suggestion.
-
Your suggestion is duly noted and has been implemented on a number of occasions.
Please understand that not all possibilities that can be performed in the editor are located in the tutorials, though some are better than others.
As a matter of fact, seems the BIS developers themselves come here to learn a few tricks with the large population of scripting/programming Arma fans.
Thanks :)