The Dink Network

Reply to Another problem about external

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 28th 2005, 04:02 AM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
In my DMOD, a sprite runs a script, where I put the following command:
external("dot1", "change");
to change the frame of another sprite. The "change" procedure is the following:

void change(void)
{
Playsound(17,22050,0,0,0);
sp_pframe(&d1, 2);
&s1 = 10;
}

in the main procedure of dot1, I put the command : &d1 = &current_sprite , and &d1 is a global variable.
If I let the &current_sprite, the sprite who calls the external(...) changes.(I guess he is the current sprite in that moment)
Sometimes, it does the specified action, but sometimes it changes the frame for another dot, or sprite (I have 9 dots). I guess the sprite number changes.
Can someone tell me how to fix this bug?