Editor crashes when a spawn script goes off

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Kinnu
Posts: 10
Joined: Fri Apr 27, 2012 7:38 pm
Location: Finland

Editor crashes when a spawn script goes off

Post 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?
Sometimes, criminals are dogs
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: Editor crashes when a spawn script goes off

Post 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/
Post Reply