The Dink Network

Reply to Re: need some help

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:
 
 
July 28th 2010, 04:13 PM
anon.gif
developer
Ghost They/Them
 
i see. it's not working how I had in mind though. i would like the rock to move 5 pixels to the right everytime the player pushes it. i have made this now:

void main(void)
{
int &direction;
&location = sp_x(&current_sprite, -1)
sp_speed(&current_sprite, 1);
sp_hard(&current_sprite, 0);
draw_hard_map();
}

void push(void)
{
&direction = sp_dir(1, -1);
if (&direction == 6)
{
if (&location == 350)
{
move(&current_sprite, 6, 355, 1);
draw_hard_map();
&location = sp_x(&current_sprite, -1)
&location += 5;
}
}

if (&location > 350)
{
move(&current_sprite, 6, &location, 1);
draw_hard_map();
&location = sp_x(&current_sprite, -1)
&location += 5;
}
}


the rock begins at x=350, so when the player pushes the rock, it moves 5 pixels (to 355) but when pushed again, the rock doesnt move again. also the hardness of the rock stays in the old position instead of the new position...