The Dink Network

Reply to Re: Sp_dir 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 15th 2003, 10:45 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Make a global called &last_map. Then place on the adjoining four screens a sprite with the following script:

void main(void)
{
&last_map = &player_map;
}

Then on the screen with the knight:

void main(void)
{
if (&last_map == xyz)
{
//screen north
sp_dir(&sprite, 8);
}
if (&last_map == xyz)
{
//screen east
sp_dir(&sprite, 6);
}
if (&last_map == xyz)
{
//screen south
sp_dir(&sprite, 2);
}
if (&last_map == xyz)
{
//screen west
sp_dir(&sprite, 4);
}
//other code
}

Where xyz are the numbers of the four adjoining screens. Of course, the number of the screen north should be placed in the if statement of the northern screen.