The Dink Network

Reply to Re: screen scroll

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 2004, 11:23 AM
pq_frog.gif
Ric
Peasant They/Them Canada
 
As Joshriot says you can do much with warp properties of sprites, but if you do want a large area to wrap then its like this:
void touch ()
{
&player_map += 5;
sp_x(1,590);
load_screen(&player_map);
draw_screen();
}
This is wrap-L.c . It moves the player 5 screens to the right and along the right edge of the screen. note, it does not have a fade_down and fade up. Its basicly the minimum needed to do this. (wrap-R.c is the same, but -=5; and sp_x=10
&player_map,&sp_x, and &sp_y are global variables created in main. Normaly the engine updates them whenever dink walks to the edge of the screen, then the engine automaticaly does the load and draw of the new screen. Since the variables are global, any script can control it.
Of course this script is attached to an invisable sprite within 10 pixels of the edge.