Page 1 of 1

Trouble removing object through LUA.

Posted: Tue Dec 06, 2016 2:47 am
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?

Re: Trouble removing object through LUA.

Posted: Tue Dec 06, 2016 3:42 pm
by Marth8880
What's the ClassLabel of rep_cap_venator_dorsal_hanger? Prop? Armedbuilding? What?

Re: Trouble removing object through LUA.

Posted: Tue Dec 06, 2016 11:01 pm
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.

Re: Trouble removing object through LUA.

Posted: Tue Dec 06, 2016 11:02 pm
by Marth8880
Try giving it a MaxHealth value in its ODF. Doesn't matter what the value is, just something.

Re: Trouble removing object through LUA.

Posted: Tue Dec 06, 2016 11:47 pm
by SkinnyODST
Still doesn`t work. It still shows up and still glitches out.