The Dink Network

Reply to Re: move_stop("blah,blah,blah", ¤t_sprite)

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:
 
 
August 4th 2004, 08:20 AM
pq_frog.gif
Ric
Peasant They/Them Canada
 
The 'dink c reference' v. 1.3 is the best source of all that info. But here is a start;
move_stop(Sprite#,Direction#,Stop at x or y, Hard0 ornot 1);
The sprite # can be a variable such as &current_sprite or the real # like 1 (Dink himself). The direction as per number pad, eg;9 is up and right.
Directions 8 and 2 will stop at the y axis. All other directions look for the X axis.
If the hard is set to 0 the sprite will stop when it bumps into any object with hardness. Be carfull, that can cause a lockup.
So,
freeze(&current_sprite); // good to freeze him.
move_stop(&current_sprite,6,300,1);
unfreeze(&current_sprite);//remember to unfreeze him.
// now the sprite this script is attached to will freeze, walk to the right (even through objects) until he is halfway to the right, unfreeze, then the script will continue.('_stop' stops the script until the cordinate '300' is met) If the sprite is already on the right it won't seem to do anything.