how do i make npcs move slower or faster?: |
New() this is the code,i try to change the lag but i cant figure out where |
New() i altered it but it still wont slow down the npc |
Alter the existing sleep instructions. Don't add new ones all willy-nilly. That's just crazy.
|
In response to Tiago7727
|
|
Tiago7727 wrote:
i tryed to change them all still no use I wasn't guessing. |
Format:
step_to(Ref,Trg,Min=0,Speed=0) Returns: 1 on success; 0 otherwise. Args: Ref: A mob or obj. Trg: An object on the map. Min: The minimum distance between Ref and Trg before movement halts. Speed: Speed to move, in pixels. 0 uses Ref.step_size. I'm assuming you can alter the "speed" there and set it lower. Other than that, Ter was pretty correct on the sleeps. They usually work. |
If you are using a loop with step(), just sleep between steps.
NPCs can't move any faster than 1 time per tick, so consider making their movement more than one tile in distance per tick.