Are we supposed to be deactivating daemons when they are done?
It just occurred to me that maybe AHH they don't on their own when they are finished. Which means all the ones I fire will just keep executing and then things get weird once we get past turn 32767.
Deactivating daemons
Moderators: Ice Cream Jonsey, joltcountry
- Ice Cream Jonsey
- Posts: 30175
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
Deactivating daemons
the dark and gritty...Ice Cream Jonsey!
-
- Posts: 2255
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
Re: Deactivating daemons
Fuses will deactivate themselves once the timer reaches 0, but yes, non-fuse daemons should manually be deactivated when not in use. I mean, I don't think it'll break your game or anything, but yeah, it will just keep running the daemon code indefinitely unless you stop it.
- Ice Cream Jonsey
- Posts: 30175
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
Re: Deactivating daemons
Well. Nobody try to make 32,000 moves in my games then.
Would you say that the last case of each daemon should be a Deactivate(self)? It seems like that would be fine, having the daemon deactivate its own self? I hope?
Would you say that the last case of each daemon should be a Deactivate(self)? It seems like that would be fine, having the daemon deactivate its own self? I hope?
the dark and gritty...Ice Cream Jonsey!
-
- Posts: 2255
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
Re: Deactivating daemons
That should work. Here is some code from Spur that does it:
Code: Select all
daemon sarahroad_daemon ! waiting for you
{}
event sarahroad_daemon
{
"\n\"I'm glad you made it,\" Sarah says as she climbs down from
her horse."
move sarah to location
Activate(sarahfollow_daemon)
Deactivate(self)
}
- Ice Cream Jonsey
- Posts: 30175
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact: