twisted 128 Posted May 15, 2015 i just cont figure this out for some reason. i want to take _nada2 = [_x] call tws_simpleRearm; and pass it as an addmpeventhandler in the case of the unit being killed. _x addMPEventHandler ["mpkilled", "tws_nada2 = [_this] call tws_simpleRearm;"]; the variable being looped through in the foreach is allunits i keep getting an error message i think im getting sqf scope mixed up again. Share this post Link to post Share on other sites
benargee 20 Posted May 15, 2015 (edited) try _x addMPEventHandler ["mpkilled", {tws_nada2 = [_this] call tws_simpleRearm;}]; Edited May 15, 2015 by Benargee Share this post Link to post Share on other sites
jshock 513 Posted May 15, 2015 (edited) try_x addMPEventHandler ["mpkilled", "{tws_nada2 = [_this] call tws_simpleRearm;}"]; If you have the braces the outer quotes are redundant. Also, I believe if there is any sort of suspension within the function itself, you will need to spawn the call to function inside the EH. Edited May 15, 2015 by JShock Share this post Link to post Share on other sites
twisted 128 Posted May 15, 2015 nice, thanks for that. SQFs sure have many different intricacies. Share this post Link to post Share on other sites