The Dink Network

move_stop() weirdness

February 14th, 01:06 AM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
Something else I can't get to the bottom of

using move_stop(&current_sprite, 8, 400, 1);

Now this should move the &current_sprite down until y co-ordinate of 400 is reached and the script stops until that event has been achieved, but in the script I've got it doesn't happen. That line just gets skipped.

It is in a conditional if statement as part of the main procedure as it is part of a little cut scene if Dink enters the screen and &vision is switched from 0 to 1. The sprite the script is attached to is a vision 1 sprite.

move_stop() works outside of this script, for as a test I added it to a key script and moved Dink around without a problem.

Any clues?

February 14th, 03:16 AM
pq_knight.gif
exdeathevn
Peasant He/Him New Zealand rumble
"Skinny Legend" 
Any chance of larger snippet of the code?
Is there a ; on the if (x == x) line breaking it, perhaps?
if (&variable == 0)
  {
  move_stop(&current_sprite, 8, 400, 1);
  }

Unsure what the issue could be, but I assume the if statement works with a test say.
("If check", 1);
February 14th, 07:06 AM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
Could be as simple as

it should be move_stop(&current_sprite, 2, 400, 1);

D'oh!
February 14th, 09:36 AM
pillbug.gif
Pillbug
Peasant He/Him United States
Love! True love! 
I'm sure you probably know this, but the direction numbers are aligned with the numpad (2 is down, 8 is up top, 6 on the right, etc) if you ever have trouble remembering which ones are which.
February 14th, 07:12 PM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
I have trouble remembering many things...

Unfortunately my Mac Laptop doesn't come with a numpad, so I'll have to try harder to remember things