The Dink Network

Reply to Re: Windemere variable thing

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:
 
 
June 20th 2005, 05:09 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Milo: I'm pretty sure those will be completely gone.

I think &current_sprite, &enemy_sprite, &missile_target are special variables. They're not real globals, so they'll work in whatever script calls them.

Simeon: Sort of. Dink isn't multi-threaded, so it can really only run one script at an exact instant. It runs one script and then the other in such a quick succession that you don't realize it.

If you do no-wait-infinite-loop, the game locks up, because it is devoting itself to running that one script until it gets to a wait or the end of the script function.

As it is, variable scoping in the Dink engine is not reliable. Try something like this:

void main(void)
{
int &rand = random(1,100);
say("&rand", &current_sprite);
}

And attach it to multiple sprites on the same screen. They'll all say the same number (... I think).