Page 1 of 1

Energy drain on grenade explosion

Posted: Tue Apr 01, 2014 3:47 pm
by JimmyAngler
Is there a line for an odf that drains sprint/roll/energy when a grenade explodes?

Re: Energy drain on grenade explosion

Posted: Tue Apr 01, 2014 4:00 pm
by Marth8880

Re: Energy drain on grenade explosion

Posted: Tue Apr 01, 2014 4:53 pm
by LRKfm946
It could be done via lua (I think). When the player gets damaged, get the class of the object that damaged them, if it's the class of the energy drain grenade, then decrease the player's stamina.

It might not work though, because I'm having issues changing stamina via Lua right now. I don't know if I'm not doing it right or if it's just not possible. I'm using SetProperty(playerUnit, "EnergyRestore", value).