Destroy Command?

Kieron_59
06 Sept 2012, 12:55
I have a lot of consumable items in my game, like food, and when an item is acquired it is copied to the player.
I wouldn't think it's very memory efficient to just remove the item after it's been used, but I can't find a 'destroy' script command even though one is mentioned in the documentation.

Pertex
06 Sept 2012, 14:55
Alex removed this command from the gui, but you could use my library, which adds a "delete object" to the gui. It calls the internal destroy command.

Kieron_59
06 Sept 2012, 15:02
Yeah, I thought that's what it was. Thank you.

Alex
06 Sept 2012, 16:11
You don't need to use destroy unless for some reason you're dynamically creating a lot of objects. It is quicker just to hide an object. You won't save much memory by destroying - and you won't save any unless the player saves and reloads, because "undo" will keep a reference to the destroyed object anyway.