The Dink Network

Reply to Re: Enemy won't target Dink

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 19th 2015, 07:30 PM
boncag.gif
JugglingDink
Peasant He/Him United Kingdom
Streetfish 
Actually, that's not a bad idea. If I had them launch upwards from the dragons first that might be able to make a pretty neat effect. Maybe I'll make two dragons.

For now I've sorted it out by having them use sp_follow, then put in a kind of manual attack procedure like this:

//NOTE: I cut out pretty much everything irrelevant
void main(void)
{
	int &counts = 0;
	int &mcounter = random(40, 60);
	goto loop;
}

void shoot(void)
{
	loop:
	&counts += 1;
	wait(100);
	if(&counts < &mcounter)
	{
		goto loop;
	}
	//This set-up means the wait-time isn't forgotten when interrupted
	
	&counts = 0;
	&mcounter = random(20,30);

	//Attack scripts go here
}

void hit(void)
{
	//Make noises 'n' stuff
	goto loop;
}


For some reason directly calling it as a shoot() command made it ignore the loop-cycle, which is why I've ended up using the goto tags instead. Not the neatest thing, but hey-ho.