farran 1 Posted November 14, 2013 Hi, Really Nice community here. I just wonder if anyone can help me with my scripting questions i have. I trying to "handledDamage" to an object with only "Explosive charge" i think the name is "DemoCharge_Remote_Mag" all other damage is not allowed. found something here but that didn't work. I also try to exclude the last selected marker spot from BIS_fnc_selectRandom from eg. markerxx = (["m1","m1_1"] call selectRandom); so it will not be selected twice in a row. I appreciate all help i can get here, this is a last bit of the puzzle after 8 weeks of "trying to understand coding in arma":confused: But i will publish the work later on when done. It's a mission generator that never ends. //Farran Share this post Link to post Share on other sites
wok 1 Posted November 14, 2013 1) In the wiki it says that if your handleDamage event handler returns 0 or no value then the object will be invulnerable. So you could use that and check if _this select 4 (which is the projectile parameter passed by the event handler) is equal to the allowed projectile, if it's you destroy the object with setDamaga 1;, if the projectile is not allowed you just return 0 and the objects remains invulnerable. (not sure if this would work haven't tested). 2) If your markers array has uniques values you can remove the used entry with: markersArray = markersArray - markerxx; Share this post Link to post Share on other sites
DarkDruid 96 Posted November 15, 2013 1) In the wiki it says that if your handleDamage event handler returns 0 or no value then the object will be invulnerable. It is better to use documentation of EH for Arma 3, because there are some changes. If there is no return value, then object is not invulnerable anymore in Arma 3: http://community.bistudio.com/wiki/ArmA_3:_Event_Handlers#HandleDamage Share this post Link to post Share on other sites
wok 1 Posted November 15, 2013 It is better to use documentation of EH for Arma 3, because there are some changes. If there is no return value, then object is not invulnerable anymore in Arma 3: http://community.bistudio.com/wiki/ArmA_3:_Event_Handlers#HandleDamage Thanks for the clarification. So, in A3 you have to return 0 to make it invulnerable. I always visit the A2 page because I just type "event" on the url bar and the url appears, I will update it to A3 now. Share this post Link to post Share on other sites