The Dink Network

Monster spawning

July 10th 2009, 06:20 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
If I create a monster by script. How can I make it so that it doesn't spawn after I kill it?
July 10th 2009, 06:55 AM
pq_water.gif
flood
Peasant He/Him New Zealand
 
I'd use a global variable
for example &dead and have the default as 0

and have it in the spawning script like:

if(&dead == 0)
{
create_sprite( <blah blah blah> )
}

then in the monsters script under the die procedure just set &dead to 1

Voila! no more respawning
July 10th 2009, 06:58 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
No, I think there's much easier way. I might know it, but I just don't want to test it so I don't screw up anything.
July 10th 2009, 10:02 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
The method Flood mentioned is probably the most easy to use. The obvious disadvantage is that it costs you a global. Though this shouldn't worry you too much for a small DMOD.

There might also be other ways, but that depends on how you spawn the monsters exactly. You could work with editor frames or editor sequences if the script used to spawn the monsters is attached to a sprite that is placed in the editor.