View Single Post
Old October 10th, 2008, 10:00 PM   #4
unkala
 
Join Date: Nov 2006
Location: Seattle, WA
Posts: 11
Re: simple spawner question

Quote:
Originally Posted by sidusar
I would do this by making a cyclic timer that goes off every second and activates the NPC every time it goes off. That way the NPC respawns right after the corpse disappears. If you need it to respawn right after death, add an "<NPC> deactives" event to it's death
The issue with that is that the respawn won't always happen one second after the corpse vanishes. It can be anywhere from 0 to 1 seconds, essentially at random, depending on when the NPC dies compared to the timer's beat. And it can be different every time. That's not bad, maybe not even noticeable, at 1 second, but if the OP wants a longer respawn delay, like 5 or 10 seconds, that randomness gets wider.

Quote:
Unkala's method probably works too though.
It does. I tried it out first. Specifically, I wasn't sure if multiple actions in one event are guaranteed to happen in the order they're listed.

Quote:
I wouldn't do this though. In my experience, timers that get repeatedly started, triggered, stopped, and started again... well, they get messy.
Messy as in hard for the designer to keep track of what he's using for what, or messy as in the game doesn't reset them properly and they start running for the wrong durations, or running but never firing?

Using a dialogue as a substitute timer instead of an actual timer doesn't sound like a good way to avoid confusion...
unkala is offline   Reply With Quote