The Dink Network

Reply to Execution of script on game load

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 1st 2012, 02:58 AM
pq_thinger.gif
In the dmod I'm working on there are various ticking-counters which need to be running continually.
The method I'm using currently is to spawn(); them in the start-1.c. This then presents the problem of them unloading when the player resumes the game. My solution to this is to then have a launch script attached to screens with savebots on them. This script when loaded will execute a "term" procedure in the ticking scripts with an external(); and then spawn(); them again.

void term (void)
{
kill_this_task;
debug("Tick Killed");
}


While this method is working, it is somewhat heavy handed and limits what I can do on savescreens.
Also the ticking counter's values are stored in globals.
Edit: Is there a way to check if a script is currently loaded into memory/executing? I had a dig in the dinkc reference and couldn't find anything.
Edit 2:OCD Formatting and grammar
So my question to you is there an easier solution to this?