Page 1 of 1

Fighter dies, removing objects via lua [Solved]

Posted: Sun Jul 13, 2014 11:26 am
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

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

Posted: Sun Jul 13, 2014 11:37 am
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.

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

Posted: Sun Jul 13, 2014 2:24 pm
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")

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

Posted: Sat Jul 19, 2014 8:44 am
by Anakin
Thank you both. I moved the fighter now in a controlzone region.

the set property things worked fine to disable the falcon.