BEAKSBY 11 Posted May 14, 2014 Hi Folkes, In my init.sqf script below, for MP, my player has to step out of his vehicle to call the addAction that executes "ArmorDrop.sqf" or "O_ArmorDrop.sqf", depending whether they are EAST or WEST. Can an addAction be called from inside the vehicle, if so, how? Part of my init.sqf: waitUntil {!isNull player}; //////////////////////////////////////////////////// If (side player == WEST) then {// for west units player addAction ["<t color='#FF0000'>M2A4 Slammer UP $1200</t>", "ArmorDrop.sqf",[],0,true,true,"","sector1 getVariable 'owner' == side _this and _this == _target && ((screenToWorld [0.5,0.5]) distance (_target) < 100)"] ; player addEventHandler ["RESPAWN", { player addAction ["<t color='#FF0000'>M2A4 Slammer UP $1200</t>", "ArmorDrop.sqf",[],0,true,true,"","sector1 getVariable 'owner' == side _this and _this == _target && ((screenToWorld [0.5,0.5]) distance (_target) < 100)"]; }]; } else {// change this for east units player addAction ["<t color='#FF0000'>T-100 Varsuk $1200</t>", "O_ArmorDrop.sqf",[],0,true,true,"","sector1 getVariable 'owner' == side _this and _this == _target"] ; player addEventHandler ["RESPAWN", { player addAction ["<t color='#FF0000'>T-100 Varsuk $1200</t>", "O_ArmorDrop.sqf",[],0,true,true,"","sector1 getVariable 'owner' == side _this and _this == _target"]; }]; }; ///////////////////////////////////////////////////////////////////////////////////////// Share this post Link to post Share on other sites
f2k sel 164 Posted May 14, 2014 Add the word vehicle before the _this, it causes it it to be true for a unit on foot or in vehicle. player addAction ["<t color='#FF0000'>M2A4 Slammer UP $1200</t>", "ArmorDrop.sqf",[],0,true,true,"","sector1 getVariable 'owner' == side _this and vehicle _this == _target && ((screenToWorld [0.5,0.5]) distance (_target) < 100)"] ; Share this post Link to post Share on other sites
BEAKSBY 11 Posted May 15, 2014 Yup, that solved it. Thanks! Share this post Link to post Share on other sites