thetrooper 10 Posted February 28, 2014 Hi all, does anyone know how to remove multiple actions? _action = _this select 1; _car removeaction _action; _action = _this select 2; _car removeaction _action; I seem to have trouble removing various actions Share this post Link to post Share on other sites
TrueCruel 10 Posted February 28, 2014 If you want to remove all actions then use this: https://community.bistudio.com/wiki/removeAllActions If you want to delete specific ones: give the addAction a variable ActionVar1 = _unit addAction xyz then when you execute the script use 0 = [_unit, ActionVar1, ActionVar2, ..] execVM "yourscript.sqf" This should do the trick Share this post Link to post Share on other sites
KC Grimes 79 Posted February 28, 2014 Care to show the rest? Remember, the return value is the index value, so you need to have something like _thisisyourreturnandindex = object addAction [blahblah]; Edit: Ninja'd. Share this post Link to post Share on other sites
thetrooper 10 Posted February 28, 2014 hmmm, not really too sure about how to do it... I got two things going on. Beacons and Siren If the siren is on i don't want an option to turn beacons on, because my siren is on. Only option would be to turn off the siren. However, if beacons are on, can activate siren etc. each option runs a new sqf ---------- Post added at 07:36 PM ---------- Previous post was at 06:47 PM ---------- Sounds like a concept. I'm getting into the realms of variables, though not there yet. I put this in the sqf file that loads with the vehicle (init) beacsOn = _this addAction Beacons On; sirenOn = _this addAction Siren On; 0 = [_this, beacsOn] execVM "beaconson.sqf"; 1 = [_this, beacsOn] execVM "SirenOn2.sqf"; Doesn't show up. Obviously putting it in the wrong place. Share this post Link to post Share on other sites
TrueCruel 10 Posted February 28, 2014 Ah then maybe this: beacsOn = _this addAction ["_yourActionText", {0 = execVM "_yourScript.sqf"; 0 = [_this, beacsOn] execVM "beaconson.sqf"}]; sirenOn = _this addAction ["_yourActionText", {0 = execVM "_yourScript.sqf"; 0 = [_this, sirenOn ] execVM "SirenOn2.sqf"}]; beaconson.sqf disable the SirenAction and SirenOn2.sqf disables the BeaconAction right? If not then just flip those two. Share this post Link to post Share on other sites
thetrooper 10 Posted March 1, 2014 Yeah that's right. I'll give it a go. Because it's a variable, do I disable them by deleteVehicle in the other SQF files? Share this post Link to post Share on other sites
TrueCruel 10 Posted March 1, 2014 Nope, still have to use removeAction for that. Share this post Link to post Share on other sites