Reply to Re: Multiple Sprites
If you don't have an account, just leave the password field blank.
Every time you do "&var = number" the variable is now that number and "forgets" what it was before, so you can use it for different things but if you create a few sprites the variable will only refer to the last one.
Example from my D-Mod:
void main(void)
{
int &bug;
&bug = create_sprite(120, 99, 9, 131, 1);
sp_script(&bug, "v23-bug");
&bug = create_sprite(63, 147, 9, 133, 1);
sp_script(&bug, "v23-bug");
&bug = create_sprite(101, 233, 9, 131, 1);
sp_script(&bug, "v23-bug");
&bug = create_sprite(111, 316, 9, 131, 1);
sp_script(&bug, "v23-bug");
&bug = create_sprite(182, 185, 9, 133, 1);
sp_script(&bug, "v23-bug");
//etc...
}
That makes a load of different bugs all with the same script attached but I'd have to give each it's own variable if I wanted to do something with them later.
Example from my D-Mod:
void main(void)
{
int &bug;
&bug = create_sprite(120, 99, 9, 131, 1);
sp_script(&bug, "v23-bug");
&bug = create_sprite(63, 147, 9, 133, 1);
sp_script(&bug, "v23-bug");
&bug = create_sprite(101, 233, 9, 131, 1);
sp_script(&bug, "v23-bug");
&bug = create_sprite(111, 316, 9, 131, 1);
sp_script(&bug, "v23-bug");
&bug = create_sprite(182, 185, 9, 133, 1);
sp_script(&bug, "v23-bug");
//etc...
}
That makes a load of different bugs all with the same script attached but I'd have to give each it's own variable if I wanted to do something with them later.