Jump to content
Sign in to follow this  
pravania

Random stance script

Recommended Posts

I'm trying to create a script so that units will change stance behind walls and sand bags.

Currently I have

null=[this]execvm "stance.sqf" that I put in the units init line.

stance.sqf is

-------------------------------------------------------------------------------------------------

while {true} do {

_unit=_this select 0;

_unit setUnitPos "middle";

sleep 30;

_unit setUnitPos "up";

};

sleep 5;

---------------------------------------------------------------------------------------------------

But the issue I am having is that the unit will go from the default standing pos into the "middle" stance but then will stay there and not then carry on into the "up" pos again.

Thanks for any help in advance.

Share this post


Link to post
Share on other sites
_unit = _this select 0;

while {alive _unit} do {
_unit setUnitPos "MIDDLE"; 
sleep 30;
_unit setUnitPos "UP"; 
sleep 5;
};

Share this post


Link to post
Share on other sites
_unit = _this select 0;

while {alive _unit} do {
_unit setUnitPos "MIDDLE"; 
sleep 30;
_unit setUnitPos "UP"; 
sleep 5;
};

Thanks very much Cobra, it works perfectly

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×