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:02 AM
anon.gif
Spacehoggy
Ghost They/Them
 
Hurragh! sort of. It almost works perfectly when you comment out the part that stops the arrow moving beyond a certian point. What in that part could be causing the the arrow to freeze? Thanks.

void main (void)
{
draw_status();
freeze(1);
if(&tifany==1)
{
int &2tifany2 = Create_sprite(110, 290, 16, 227, 1);
}
if(&fight==1)
{
int &arrow = create_sprite(510, 350, 0, 192, 2);
int &hit = say_xy("Hitpoints, &life", 90, 340);
int &att = say_xy("Attack", 550, 330);
int &mag = say_xy("Magic", 550, 350);
int &itm = say_xy("Item", 550, 370);
int &run = say_xy("Flee", 550, 390);
sp_kill(&hit, 0);
sp_kill(&att, 0);
sp_kill(&itm, 0);
sp_kill(&mag, 0);
sp_kill(&run, 0);
int &controlbox = create_sprite(58, 341, 0, 192, 1);
sp_depth_que(&controlbox, 5);
int &yarrow;
&yarrow = sp_y(&arrow, -1);
loop:
//if (&yarrow > 330)
//{
//&yarrow = 390;
//}
//if (&yarrow < 390)
//{
//&yarrow = 330;
//}
sp_y(&arrow, &yarrow);
wait_for_button();
if (&result == 18)
&yarrow -= 20;
if (&result == 12)
&yarrow += 20;
goto loop;
}
}