Page 1 of 1
Activating an Award or Buff via LUA
Posted: Tue Feb 09, 2010 6:02 pm
by Master_Ben
So I'm trying to activate a health regen for the team when someone enters a region. I have onenterregion hooked up fine, (confirmed by a localization string print), the issue is how to activate the award. I've tried editing the unit class odf and adding award lines, as well as killing an invisible object and sending out an explosion with the health buff codes from leia's weapon, and have drawn up blank. How should I go about doing this?
Re: Activating an Award or Buff via LUA
Posted: Wed Feb 10, 2010 5:39 am
by mswf
Try to spawn an invisible turret that's non the same team as the team that's going to get the award and give it the health buff weapon.
Re: Activating an Award or Buff via LUA
Posted: Wed Feb 10, 2010 6:28 pm
by Master_Ben
.... But why would the AI turret fire? And why when I told it to?
Re: Activating an Award or Buff via LUA
Posted: Wed Feb 10, 2010 6:33 pm
by Sky_216
forums/viewtopic.php?f=27&t=13743
bit in first post on the shield generator has your answer I believe.
Re: Activating an Award or Buff via LUA
Posted: Wed Feb 10, 2010 7:00 pm
by Master_Ben
Wow man, thanks a lot. One question however, will autofire constantly make it fire? Because if the turret fired the buff weapon, and then the unit died, his respawned unit wouldn't inherit that buff.
Re: Activating an Award or Buff via LUA
Posted: Wed Feb 10, 2010 7:17 pm
by Sky_216
Master_Ben wrote:Wow man, thanks a lot. One question however, will autofire constantly make it fire? Because if the turret fired the buff weapon, and then the unit died, his respawned unit wouldn't inherit that buff.
Will make it fire as much as possible. So if the weapon it uses has a long reload (stock buffs do) it'll fire at intervals equal to the reload time/shot delay.
Re: Activating an Award or Buff via LUA
Posted: Wed Feb 10, 2010 7:45 pm
by Master_Ben
'Kay, and again, thanks a lot.