Trouble removing object through 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
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Trouble removing object through LUA.

Post by SkinnyODST »

I have a giant Venator prop in the sky of my map. I`ve upped the unit count for one of my map`s eras and when a certain amount of units spawn, the Venator prop glitches out and parts of it fly around the screen until the game crashes. I`ve tried adding KillObject("rep_cap_venator_dorsal_hanger") to my lua but for some reason its still there. I`ve also tried "DeleteObject", but that stops units from spawning. Does anyone know how I`d delete/remove the Venator from that era?
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: Trouble removing object through LUA.

Post by Marth8880 »

What's the ClassLabel of rep_cap_venator_dorsal_hanger? Prop? Armedbuilding? What?
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: Trouble removing object through LUA.

Post by SkinnyODST »

Marth8880 wrote:What's the ClassLabel of rep_cap_venator_dorsal_hanger? Prop? Armedbuilding? What?
Hidden/Spoiler:
[code][GameObjectClass]

ClassLabel = "armedbuilding"
GeometryName = "rep_cap_venator_dorsal_hangar.msh"

[Properties]

GeometryName = "rep_cap_venator_dorsal_hangar"

FoleyFXGroup = "metal_foley"[/code]
Armed building.
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: Trouble removing object through LUA.

Post by Marth8880 »

Try giving it a MaxHealth value in its ODF. Doesn't matter what the value is, just something.
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: Trouble removing object through LUA.

Post by SkinnyODST »

Still doesn`t work. It still shows up and still glitches out.
Post Reply