Deactivating daemons

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:smile: :sad: :eek: :shock: :cool: :-x :razz: :oops: :evil: :twisted: :wink: :idea: :arrow: :neutral: :mrgreen:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Deactivating daemons

Re: Deactivating daemons

by Ice Cream Jonsey » Sat Apr 27, 2024 12:38 pm

Thanks Roody!

Re: Deactivating daemons

by Roody_Yogurt » Sat Apr 27, 2024 12:33 pm

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

by Ice Cream Jonsey » Sat Apr 27, 2024 12:09 pm

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

by Roody_Yogurt » Sat Apr 27, 2024 2:34 am

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.

Deactivating daemons

by Ice Cream Jonsey » Fri Apr 26, 2024 10:49 pm

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.

Top