Fighter dies, removing objects via lua [Solved]

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
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Fighter dies, removing objects via lua [Solved]

Post by Anakin »

Hi,

i have a problem with a fighter. I added it on hoth with a custom lyr file, but after a while the fighter dies and than respawn. and that not once but all the time.
I used the same method for the secret hangar and there is no problem with the fighters.
Hidden/Spoiler:
Image
Also i thought it would be nicer to have the fighter here instead of the falcon. But how can i remove it??
I already tryed this:

Code: Select all

KillObject("wagsd")
KillObject("falconl7")
KillObject("falconl6")
KillObject("falconl8")
KillObject("falconl9")
KillObject("falcon1")
Hidden/Spoiler:
Image
Last edited by Anakin on Sat Jul 19, 2014 8:45 am, edited 1 time in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Fighter dies, removing objects via lua within this conte

Post by Marth8880 »

Regarding your first issue, I'm pretty sure that's happening because the vehicle spawn most likely isn't in a ControlZone region. If you don't want to make a ControlZone region, you should be able to just set the vehicle spawn's ExpireTimeEnemy, ExpireTimeField, and DecayTime values to 0.
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: Fighter dies, removing objects via lua within this conte

Post by Locutus »

Regarding your second issue, KillObject() won't work if the object is just a prop and not a destructible building. Try this instead:
SetProperty("propname", "IsVisible", 0)
SetProperty("propname", "IsCollidable", "0")
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Fighter dies, removing objects via lua within this conte

Post by Anakin »

Thank you both. I moved the fighter now in a controlzone region.

the set property things worked fine to disable the falcon.
Post Reply