The Dink Network

Reply to Re: Exact wait();

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:
 
 
October 8th 2014, 03:15 PM
wizardb.gif
Endy
Peasant He/Him United States
 
That sp_attack_wait trick is pretty cool.

If anyone wants to see what Paul is describing:
// sp_attack_wait returns the raw time at which the sprite is able to attack next.
// - DinkC Ref

void main( void )
{
sp_brain(&current_sprite, 10);
sp_target(&current_sprite, 1);
sp_attack_wait(&current_sprite, 1000);
}

void attack( void )
{
int &say = sp_attack_wait(&current_sprite, -1);
say("&say", 1);
sp_attack_wait(&current_sprite, 1000);
}

For the beating heart you'll want to query your brain 10 sprite and adjust the wait time off of the value given by sp_attack_wait.