Jump to content
Sign in to follow this  
3l0ckad3

setUnitPos not working ?

Recommended Posts

Is setUnitPos not working, I'm running no mods or anything and it will not execute at all through trigger or unit's init, or by sqf.. I use this syntax all the time and there is no reason for it not to run as I even checked it out in a controlled environment. I literally use this line in every mission I make. Is it only me ? 

This is how I'm running it.

Unit init

this setUnitPos DOWN;

Trigger

rsnp1 setUnitPos DOWN;

Sqf

_rsnp1 setUnitPos DOWN;

Share this post


Link to post
Share on other sites

I'm not sure, but I tried using it the other day in response to a question I saw on another forum and found it not to work, also.  It seemed like it might have possibly done something, but as soon as the units detected enemies they ignored it.  Might have been a coincidence, and it never worked at all, but I did not investigate further.

Share this post


Link to post
Share on other sites

Unit position needs to be a string.

 

try;

this setUnitPos "DOWN";

Share this post


Link to post
Share on other sites

Unit position needs to be a string.

 

try;

this setUnitPos "DOWN";

OMG I'm such an idiot, thank you,, forgot.

Share this post


Link to post
Share on other sites

Hello community,

 

_unit setUnitPos "UP";

 

does not work for me.

 

EDIT :

I've just realized that setUnitPos "UP" does work but it seems it does not work on AI units that have previously been ordered by a player to crouch or go prone.

 

Can anyone tell me if there is another way to get AI units previously ordered by a player to crouch or go prone, to stand up after the player has either left the squad or been killed ?

 

Thanks.

Share this post


Link to post
Share on other sites

The command works but your unit has "better" consideration with its AI engine.
So, don't forget, each attempt to change a stance with a code will work a short time. The Arma's engine will override the intended stance along with combat or ambient behaviors.

You can try to disable their skills with setSkill before ordering the setUnitPos "UP".

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  

×