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 6th 2004, 05:05 AM
slayer.gif
MadStalker
Peasant He/Him Finland
tag line 
If the sprite is already on the right it won't seem to do anything.

Yeah, this makes it possible to do things like moving something to the center of the room without having to use if statements.

Compare, which one would you prefer? Both work the same:

Method 1.

int &dinkx = sp_x(1, -1);
if (&dinkx > 250 )
move_stop(1, 4, 250, 1);
else
move_stop(1, 6, 250, 1);

Method 2.

move_stop(1, 4, 250, 1);
move_stop(1, 6, 250, 1);

I always stick with the method 2. I think it's just nicer to do and saves some effort.