The Dink Network

Reply to Re: Bah, humbug.

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:
 
 
June 5th 2005, 09:38 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
//if (&yarrow > 330)
//{
//&yarrow = 390;
//}
//if (&yarrow < 390)
//{
//&yarrow = 330;
//}


This code places the arrow at y:390 if the y-coordinate is greater than 330. Since the arrow is created at an y of 350, it'll pass the first if (350>330) and so it'll be put at 390. Now 390 is not smaller than 390, so it'll stay there. Possibilities after pressing a key are y:370 and y:410. Both'll pass the first if (both are greater than 330), so they'll be put at 390 again. Repeat.

I don't know if you wanted wrapping, or must the arrow just stop? Anyway, wrap:

if (&yarrow < 330)
{
&yarrow = 390;
}
if (&yarrow > 390)
{
&yarrow = 330;
}

And stop:

if (&yarrow < 330)
{
&yarrow = 330;
}
if (&yarrow > 390)
{
&yarrow = 390;
}

Your code looks like some sort of choice menu. You do know there are built-in choice menu functions in the Dink Engine, don't you?