Page 1 of 1

Editor crashes when a spawn script goes off

Posted: Mon Oct 15, 2012 3:40 pm
by Kinnu
Here's the thing.
I tried to script spider eggs that explode when they are "killed" but the editor crashes when they are destroyed.
Anyone know why this is happening?

Re: Editor crashes when a spawn script goes off

Posted: Mon Oct 15, 2012 4:02 pm
by Grimwold
One thing that might be causing the crash is if you are using the destroy() function... this seems to cause a crash if not correctly called.

Also, if your exploding egg script is wholly in the objects.lua (e.g. as part of the onDeath hook) then it is more likely to cause a crash if there's a problem and it can also be hard to debug... so it's often better if you call a function in a script entity.

If you're not aware, there's a good hatcing spider egg script in the modding documentation which you might be able to modify to your purpose.
http://www.grimrock.net/modding/how-to- ... ider-eggs/