The Dink Network

Reply to Re: A weird question

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:
 
 
July 10th 2011, 02:59 PM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Look up scripted wraps... I think meta went through it in his tutorial?

Not specifically. But how to change screens in scripts is explained in chapter 11.3. You can simply make an object and use the touch procedure (chapter 10) to make the sprite warp Dink to the correct location. In general the script you'd need would look something like this:

void main(void)
{
sp_touch_damage(&current_sprite,-1);
}
void touch(void)
{
freeze(1);
sp_touch_damage(&current_sprite,0);
fade_down();
script_attach(1000);
&player_map = <screennumber>;
sp_x(1,<x> );
sp_y(1,<y> );
load_screen();
draw_screen();
freeze(1);
fade_up();
unfreeze(1);
kill_this_task();
}

Where <screennumber>, <x> and <y> are the screennumber, the x-coordinate and the y-coordinate of the place you want to warp Dink to. You can also leave out the fade_up and fade_down parts if you want the transition to be sudden rather than gradual. If you want to know why you need these parts I really suggest you read through chapters 10 and 11 of my tutorial!