The Dink Network

Reply to Re: Why Can't I Quit You, DinkC?

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 17th 2013, 04:47 AM
custom_coco.gif
Cocomonkey
Bard He/Him United States
Please Cindy, say the whole name each time. 
I have a Bonca that regenerates 10 HP every 2 seconds (if it's at least 10 under its max) and announces this to you. Sometimes it works and sometimes it doesn't. On a screen with 3 of them, it works on 2 but not the third, and it never works on a screen with just 1. I'm kind of tempted to just shrug my shoulders at this one, since it's just a regular enemy and not a boss, but here's another puzzle for everybody.

Code:

void main( void )
{
	sp_brain(&current_sprite, 9);
	sp_speed(&current_sprite, 3);
	sp_distance(&current_sprite, 50);
	sp_range(&current_sprite, 30);
	sp_exp(&current_sprite, 400);
	sp_base_walk(&current_sprite, 600);
	sp_base_death(&current_sprite, 550);
	sp_base_attack(&current_sprite, 590);
	sp_defense(&current_sprite, 5);
	sp_strength(&current_sprite, 28);
	sp_touch_damage(&current_sprite, 15);
	sp_hitpoints(&current_sprite, 175);
	//preload_seqs are here in the real script, blah
	
	regen()
}

void regen
{
int &heal
//recover 10 health every 2 seconds
heal:
wait(2000)
&heal = sp_hitpoints(&current_sprite, -1)
if (&heal <= 165)
{
&heal += 10
sp_hitpoints(&current_sprite, &heal)
say("`0+10 HP! HP: &heal", &current_sprite)
}
goto heal
}

//rest of script is ordinary bonca stuff