Page 1 of 1
Deactivating daemons
Posted: Fri Apr 26, 2024 10:49 pm
by Ice Cream Jonsey
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.
Re: Deactivating daemons
Posted: Sat Apr 27, 2024 2:34 am
by Roody_Yogurt
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.
Re: Deactivating daemons
Posted: Sat Apr 27, 2024 12:09 pm
by Ice Cream Jonsey
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?
Re: Deactivating daemons
Posted: Sat Apr 27, 2024 12:33 pm
by Roody_Yogurt
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)
}
Re: Deactivating daemons
Posted: Sat Apr 27, 2024 12:38 pm
by Ice Cream Jonsey
Thanks Roody!