The Dink Network

OkalyDDude's Profile


Web Page
Private Message
ICQ 59768319
YIM OkalyDDude
AIM OkalyDDude

2003-04-19 17:13:58
glennglenn, I'm not sure at all why this is in this thread, but I will answer the question regardless.

I'm assuming you have a script attached to either a sprite or a room, and you want it to trigger the first time dink enters, but no other times. Correct me if I am wrong.

Now, to do this you'll need a global. In main.c you'll see a list of all the globals being initiated. Add your own with this command, replacing "whatever" with .. well.. whatever you wish..

make_global_int("&whatever", 0);

The number zero means it starts out set as 0, and the "&" is important, it marks it as a variable.

Now, simply have the script like this:

void main(void)
if (&whatever == 0)
&whatever = 1;

Thus, when &whatever = 0, at the start of the dmod, it will run, and when it runs, it sets it to 1, therefore it will not run again.

OkalyDDude has released 1 file

Okaly-D DinkD-Mod, DemoGood 8.0April 6th, 2001