Activating an Award or Buff via LUA

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Master_Ben
Lieutenant General
Lieutenant General
Posts: 675
Joined: Wed Nov 12, 2008 9:50 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Watching your PC over your shoulder. No, the other sholder....

Activating an Award or Buff via LUA

Post 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?
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: Activating an Award or Buff via LUA

Post 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.
Master_Ben
Lieutenant General
Lieutenant General
Posts: 675
Joined: Wed Nov 12, 2008 9:50 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Watching your PC over your shoulder. No, the other sholder....

Re: Activating an Award or Buff via LUA

Post by Master_Ben »

.... But why would the AI turret fire? And why when I told it to?
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Activating an Award or Buff via LUA

Post by Sky_216 »

forums/viewtopic.php?f=27&t=13743

bit in first post on the shield generator has your answer I believe.
Master_Ben
Lieutenant General
Lieutenant General
Posts: 675
Joined: Wed Nov 12, 2008 9:50 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Watching your PC over your shoulder. No, the other sholder....

Re: Activating an Award or Buff via LUA

Post 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.
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Activating an Award or Buff via LUA

Post 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.
Master_Ben
Lieutenant General
Lieutenant General
Posts: 675
Joined: Wed Nov 12, 2008 9:50 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Watching your PC over your shoulder. No, the other sholder....

Re: Activating an Award or Buff via LUA

Post by Master_Ben »

'Kay, and again, thanks a lot.
Post Reply