The Dink Network

Reply to Re: How do you push something

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:
 
 
April 7th 2003, 07:44 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Its in the development category, silly

Here is an example push script.

void main(void)
{
sp_speed(&current_sprite, 1);
int &mydir;
int &myx;
}

void push(void)
{
&mydir = sp_dir(1,-1);
&myx = sp_x(1,-1);
if (&myx == 285)
{
if (&mydir == 6)
{
say("It's .. it's moving...", 1);
freeze(1);
move_stop(&current_sprite, 6, 350, 1);
unfreeze(1);
draw_hard_map();
return;
}
}
if (&myx == 350)
{
if (&mydir == 4)
{
say("..heavy..heavy..", 1);
freeze(1);
move_stop(&current_sprite, 4, 285, 1);
unfreeze(1);
draw_hard_map();
return;
}
}
say("It won't budge from this angle.", 1);
}