The Dink Network

Reply to Re: Pushing

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:
 
 
September 10th 2009, 03:35 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Well, you probably want to use a global in that case. (At least that's the easy way out.)

Something like this:

void main (void)
{
  if (&story > 3)
  {
    sp_x(&current_sprite,401);
    draw_hard_map();
  }
}

void push (void)
{
  if (&story == 3)
  {
    int &dir = sp_dir(1, -1);
    if (&dir == 6)
    {
      sp_speed(&current_sprite,1);
      move_stop( &current_sprite, 6, 401, 1);
      &story = 4;
      draw_hard_map();
    }
    else
      say("I can't push it in this direction...", 1);
  }
}