The Dink Network

Reply to 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, 01:42 PM
anon.gif
developer
Ghost They/Them
 
hey, i'm developing with dink, but I'm having some trouble, please help

i have a rock, and when the player pushes it, it should move to a location depending on the value of a variable, for example the player's strength.

So the script is as follows:

void main(void)
{
int &direct;
sp_speed(&current_sprite, 1);
sp_hard(&current_sprite, 0);
draw_hard_map();
}

void push(void)
{
&direct = sp_dir(1, -1);
if (&mydir == 6)
{
move(&current_sprite, 6, &strength, 1);
}
}


however, the rock will not move at all. is it possible to use variables like that in this game or not? What would be even better if i could put
move(&current_sprite, 6, &location += 5, 1);
in the script, so i could make a variable storing the current location of the rock (in coordinates) so the player can push the rock 5 pixels per time.

if anyone can help me it would be much appreciated.