The Dink Network

Reply to Re: My D-mod questions

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:
 
 
June 3rd 2010, 05:50 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
You use the move(); command for this:
move(<sprite>,<direction>,<destination>,<nohard> );


The <sprite> is the number of the sprite you want to move. The most common are 1 (Dink) and &current_sprite which is the sprite the script is attached to.
The <direction> is the direction you want the sprite to move (2 is down, 4 is left, 6 is right and 8 is up)
The <destination> is the final x or y coordinate (x if using direction 4 or 6 and y if using 2 or 8)
<nohard> is wether or not the sprite ignores hardness, you usually put this to a value of 1.

So making the current sprite move from x=100, y=100 to x=200, y=100 would look something like this:

move(&current_sprite,6,200,1);