coolfact 10 Posted September 26, 2014 I want the addaction to work only for vehicle crew and when vehicle is standing still, I have tried following in the unit init, but don't work :S this addAction ["Deploy MHQ", "missionscripts\Deploy.sqf", [this], 0, false, false, "", "player in (crew this) && speed this == 0"]; what am I doing wrong? Share this post Link to post Share on other sites
jshock 513 Posted September 26, 2014 Try (_this select 0) instead of this, or maybe just "_this". Share this post Link to post Share on other sites
iceman77 19 Posted September 26, 2014 Assuming the addAction is added to the vehicle; this addAction ["Deploy MHQ", "missionscripts\Deploy.sqf", [], 0, false, false, "", "_this in (crew _target) && {speed _target < 1}"]; wiki: Special variables passed to the script code are _target (unit to which action is attached to) and _this (caller/executing unit). Share this post Link to post Share on other sites
jshock 513 Posted September 26, 2014 Assuming the addAction is added to the vehicle; this addAction ["Deploy MHQ", "missionscripts\Deploy.sqf", [], 0, false, false, "", "_this in (crew _target) && {speed _target < 1}"]; wiki: Special variables passed to the script code are _target (unit to which action is attached to) and _this (caller/executing unit). Thanks Iceman, knew it was something along the lines of that :p. Share this post Link to post Share on other sites