The Dink Network

Reply to Re: Script Troubles

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 12th 2008, 07:52 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
First, mark your enemy's hitpoints pretty high. Then,
where you see if (&klife < ) mark the hitpoints that you want it to REALLY have. For example
try this:

void hit( void )
{
oneloop:
int &klife = sp_hitpoints (&current_sprite, -1);
if (&klife < 250)
{
freeze(1);
freeze(&current_sprite
say("`%Put the talking here!", &current_sprite);
int &boom5 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom5, 167);
playsound(24, 22050, 0, 0, 0);
wait(200);
int &boom6 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom6, 167);
playsound(24, 22050, 0, 0, 0);
wait(200);
int &boom6 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom6, 167);
playsound(24, 22050, 0, 0, 0);
wait(200);
sp_active(&current_sprite, 0);

sp_nodraw(&current_sprite, 1);
sp_brain(&current_sprite, 0);

spawn("your-script");
}
else
{
playsound(your_play_sound);

sp_target(&current_sprite, 1);
}


NOTE: Your enemy's hitpoints must ALWAYS be higher than the hitpoints you actually want for it.

Hope that helps. Please, inform, if I forgot something.