The Dink Network

Reply to Re: Hold

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:
 
 
October 3rd 2009, 05:56 AM
spike.gif
Have to? Unless the act of moving the rock is somehow important to other scripts, it's much neater to use editor_seq and/or editor_frame. Relatively simple and doesn't waste a global:

void main(void)
{
int &mahnum = sp_editor_num(&current_sprite);
int &mahseq = editor_seq(&mahnum,-1)
if (&mahseq == 1)

{
sp_x(&current_sprite,500);
draw_hard_map();
}
}

void push(void)
{
if (&mahseq == 0)
{
int &ddir = sp_dir(1,-1);
if (&ddir == 6)
{
freeze(1);
sp_speed(&current_sprite,1);
move_stop(&current_sprite,6,500,1);
editor_seq(&mahnum,1);
&mahseq = 1;

draw_hard_map();
unfreeze(1);
}
}
}