![]() |
looping question
ok, i know how to do a basic loop like to make an npc continually slide in one direction or infinetly put leaps at certain coordinates, but how do i get an npc to move back and forth, usually you just use sleep or something but that screws up the loop
|
Quote:
I like to use the x+=1 or y+=1 to slide NPCs around and use variable++ to determine how many spaces it slides. |
Quote:
If you didn't use the move command, then you would need to make a time function and set the value of the movement varible. eg: x-= this.move; when the timer is at a certain time, this.move has a minus value, else it has a positive value. - Thats just another way of doing it. Since the move command does the job, I'd recommend using that - neat and tidy :) |
Quote:
|
if you don't want any time between it changing directions, you don't need timeout either.. add the right # to the end of the move command (see newfeatures2002) to make it call movementfinished, then use:
if(movementfinished){ (i could be wrong, make sure that event is right too) move command here again } |
haha thats a nice sig cheetos :p
|
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 06:07 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.