Jump to content

Recommended Posts

I am doing a scripting in which the unit that activates it will make an animation it is simple just for a test, what I want to know is how do I make the unit that activate this script make an animation after activating it? The script is like this: it has an object with the code of addaction with the name of "take topsecret" then it will execute the sqf file it is written like this: deletevehicle topsecret; Hint "you take the topsecret"; But in the middle of that I want whoever activated the "take topsecret" command to do an animation, how can I do that?

Share this post


Link to post
Share on other sites

Not sure I get what you want, but if you want to reference something from inside an addAction it goes like this:

someObject addAction ["take topsecret",{

params ["_actionObject","_actionActivator","_actionID"];

deleteVehicle _actionObject;
hint "you take the topsecret";
_actionActivator switchMove "AmovPercMstpSnonWnonDnon_exerciseKata";

}

 

Cheers

Share this post


Link to post
Share on other sites
39 minutes ago, Grumpy Old Man said:

Not sure I get what you want, but if you want to reference something from inside an addAction it goes like this:


someObject addAction ["take topsecret",{

params ["_actionObject","_actionActivator","_actionID"];

deleteVehicle _actionObject;
hint "you take the topsecret";
_actionActivator switchMove "AmovPercMstpSnonWnonDnon_exerciseKata";

}

 

Cheers

They are in the total of 5 units that can get the topsecret, but when the topsecret is caught I want to detect who takes the topscrete and I want the animation to happen only on the unit who take the topsecret

Share this post


Link to post
Share on other sites

Activate means what? action menu for players, grab interactive document (player), or trigger for AIs/player?

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

×