The Dink Network

Reply to Re: Summoning

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:
 
 
March 6th 2006, 07:25 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Another problem. This time it concerns the script for the summoned sprite itself. Here is a piece of it's script. The thing that's wrong? As you can see, I attempted to add experience if the thing kills the enemy. Doesn't seem to work though...

void attack( void )
{
//sound effect
playsound(27, 28050,0,&current_sprite, 0);

//attack delay
&mcounter = random(4000,0);
sp_attack_wait(&current_sprite, &mcounter);

//check to kill
&enemy_hp = sp_hitpoints(&mtarget, -1);

//yay, we killed our target, get a new one, or just act stupid...and add some experience too
if (&enemy_hp <= 0)
{
//experience..why won't this freaking work!! X0
&my_exp = sp_exp(&mtarget, -1);
//&my_exp = &my_exp / 2 //say we only want dink to get half...
add_exp(&my_exp, &mtarget);
goto get_target;
}
}

note:all variables are initted in main procedure