i've been trying to make a small WW2 Mission which seemed fun. I wanted 2 fireteams to suppres the enemies while unloading from their boats, and that works just as fine, i needed to set aswell god mode to the unit cus otherwise enemies will just headshot the shit out of them, so i had this code embedded into the object init of the unit 1 and 2:
this addEventHandler ["HandleDamage", {false}];
but then, i didn't want them to be alive for ever so what i did was, place a trigger and whenever a BLUFOR would enter the trigger area, the trigger will activate, the activation code is this one
fireteam1 addEventHandler ["HandleDamage", {true}];
fireteam2 addEventHandler ["HandleDamage", {true}];
//since fireteam1 and fireteam2 are the names of the units
Tho it just gives me "Generic Error in Expression" i don't really know what am i missing in here, I really need your help. I am aswell posting some screenshots down here so you can get a better understanding of what i am having in my editor. Thanks in advance to everyone!