The Dink Network

Reply to Re: Some problem

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:
 
 
December 6th 2005, 01:58 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
or possibly the global variable thing (by adding a script whith &store = &current_sprite;
My ideea, for not wasting space with global vars was the following:
For each rock, do the following script:
-for rock 1:
void main(void)
{
sp_brain(&current_sprite, 91);
}

-for rock 2:
void main(void)
{
sp_brain(&current_sprite, 92);
}

for rock 3:
void main(void)
{
sp_brain(&current_sprite, 93);
}

Notice that I attached to every rock a different brain, that doesn't make the sprite move/change seq, and most important, that sprite is the single sprite with that brain on the screen. Then, in the procedure that makes the explosion, I enter:
int &rock1 = get_sprite_with_this_brain(91, &current_sprite);
int &rock2 = get_sprite_with_this_brain(92, &current_sprite);
and so on...
Then, you can use those variables to call the sprites.
I repeat, I don't know if it's the best ideea, but it always worked and I never had problems with it.