The Dink Network

Reply to Re: The Northern Lands: Chapter 1

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:
 
 
February 17th 2018, 08:49 AM
boncag.gif
jugglingdink
Peasant He/Him United Kingdom
Streetfish 
The touch damage needs to be -1 for it to run the first time. Think of -1 as a green light, and 0 as a red light. In your example you would put:

void main(void)
{
    sp_nohit(current_sprite, 1);
    say("`4ENTRANCE", current_sprite);

    sp_touch_damage(current_sprite, -1);
    //This tells the touch procedure to run if it is touched
}

void touch(void)
{
    sp_touch_damage(current_sprite, 0);
    //This tells the touch procedure not to run again if it's still touched

    fade_down();
    //all your screen switching stuff would then go here
}


What Toof said is true too, although I've been leaving that part out because TheDinkNetwork converts it into a weird character. As a side note, I'd also recommend using freeze(1) immediately before the fade_up and unfreeze(1) after, so the player can't move around blindly, but that's a matter of preference. Hope some of this has helped