The Dink Network

Reply to Re: Player map not changing

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:
 
 
August 27th 2011, 04:38 AM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
This is probably due to the engine not checking for touch with this sprite.
To solve it give the sprite a touch damage of -1 in the main procedure.

sample code (not tested, and haven't programmed in dinkC for ages)

void main(void)
{
sp_touch_damage(&current_sprite, -1);
}
void touch(void)
{
sp_touch_damage(&current_sprite, 0);
//we don't want it to run this again
freeze(1);
int &xchange = sp_x(1, -1);
//checking for dinks location
&xchange += 50;
//increesing the x value by 50, foir moving right later
move_stop(1, 8, &xchange, 1);
//moving right to xchange. 50 pixels right of dink
unfreeze(1);

sp_touch_damage(¤t_sprite, -1);
//Now we enable touch again
}


Msdink was faster, but she forgot something important, always disable touch in the beginning of touch procedure. Or bad things can happen!