The Dink Network

Reply to sp_target

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:
 
 
January 6th 2006, 05:39 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
I noticed that this command (present in many monsterscripts) is automaticly executed, whether you have it in your script or not:
sp_target(&current_sprite,&enemy_sprite);

Now the problem is that I let Dink fight alongside with a friend, so for the friend's script I want:
if (&enemy_sprite != 1)
{
sp_target(&current_sprite,&enemy_sprite);
}
That doesn't work because of what I just said, I could fix it by do this:
if (&enemy_sprite == 1)
{
sp_target(&current_sprite,1000);
}
but that's a pretty ugly fix, the only other thing I can think of is setting the target to be an random enemy. Or does any of you know a better fix?