Jump to content
Argonauta

switch to cursor target

Recommended Posts

Hello, I put this code in the initAI.sqf of my AI teammates to be abble to switch to them.

_unit addAction ["Switch to cursorTarget",{selectPlayer cursorTarget;}, [], 6, false, true, "", "_target != player"];

and, in the player (my default character) init.sqf, i put:

player addAction ["Switch to cursorTarget",{selectPlayer cursorTarget;}, [], 6, false, true, "", "_target != player"];

With this, i'm be able to switch to others AI teammates, but, i wasn't able to switch back to my default body, with that, i changed the code:

_unit addAction ["Switch to cursorTarget",{selectPlayer cursorTarget;}, [], 6, false, true, "", "_target != player"];

not working out again, I tried this:

this addAction ["Switch to cursorTarget",{selectPlayer cursorTarget;}, [], 6, false, true, "", "_target != player"];

but, none of the above worked for me to switch back to my default character, can someone help me and show me where I'm missing?

 

Other question:

anyone know if there is a way to do when the player is controlling the AI teammate and once this AI is dead, altomaticamente player back to its default body, and don't dead and respawn in other body?

 

to everyone who can help me, I thank.

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

×