Spawn() might be run in D3Ed

From The DarkMod Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Originally written by Ishtvan on http://forums.thedarkmod.com/topic/3810

When playing with setting the contents on clip boxes, I put a method to set the contents in the Spawn() method of the object. I saw changes in the editor based on what flag I set in the Spawn method, which indicates that Spawn() might actually be run when objects are placed in the editor.

This is good to know, because it means we might be able to do some things like automatically spawn and bind other entities along with one entity (like an idMoveable lantern that automatically spawns and binds the idLight to it). This can also be handled with prefabs, but it's good to know we have control over some things that happen in the editor.