The Dink Network

Reply to Re: I swear something in the 1.08 patch is broken

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:
 
 
March 25th 2010, 03:37 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
After some testing...

If you hit the guy, he will continue saying blah...
//external script called @ end of main proc
void extloop ()
{
loop:
wait(20);
say("`3 Blahblahblah",&current_sprite);
goto loop;
}


If you hit the guy, he will still move and say blah...
//external script called @ end of main proc
void extloop ()
{
loop:
wait(20);
say("`3 Blahblahblah",&current_sprite);
move(&current_sprite,4,20,1);
goto loop;
}


If you hit the guy, he will stop where he is and will no longer say blah meaning the loop has been broken.
//external script called @ end of main proc
void extloop ()
{
loop:
wait(20);
say("`3 Blahblahblah",&current_sprite);
move_stop(&current_sprite,4,20,1);
goto loop;
}


If you hit the guy, he will stop for a little, then go to the next direction from where he's standing. The loop will continue
//external script called @ end of main proc
void extloop ()
{
loop:
move(&current_sprite,4,200,1);
wait(2000);
move(&current_sprite,6,400,1);
wait(2000);
goto loop;
}


So summed up, if you talk to the npc while he's using move_stop() the movement and the loop will both be terminated. On the other hand, if you use just move, only the current movement will be stopped and the loop will continue on.

You can overcome the stops by doing this.

void extloop ()
{
loop1:
wait(20);
&save_x = sp_x(&current_sprite,-1);
  if (&save_x > 200)
  {
  move(&current_sprite,4,200,1);
  goto loop1;
  }

loop2:
wait(20);
&save_x = sp_x(&current_sprite,-1);
  if (&save_x < 400)
  {
  move(&current_sprite,6,400,1);
  goto loop2;
  }

goto loop1;
}