Energy drain on grenade explosion
Moderator: Moderators
-
JimmyAngler
- High General

- Posts: 837
- Joined: Mon Nov 04, 2013 10:37 am
- Projects :: Battlefront Halation
- xbox live or psn: none
- Location: Area 51
Energy drain on grenade explosion
Is there a line for an odf that drains sprint/roll/energy when a grenade explodes?
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
-
LRKfm946
- Master Sergeant

- Posts: 163
- Joined: Sun Feb 02, 2014 6:13 pm
- Projects :: Battlefront II Hunger Games
- Contact:
Re: Energy drain on grenade explosion
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).
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).
