ID:273608
 
Well I've made a basic projectile system and I've run into a bit of a problem, I need some beams and techniques to go faster. I am using walk(obj,dir,delay). But I need another way to go at this. I need it to be faster! 1 is the regular speed, the speed which everyone can walk and whatnot, 2 however is slow and cannot be used. If you can tell me how to speed this up or another way to do this please that would be great! If you want to see a small portion of the code to figure this out that can be arranged via posting here.
Make it take two steps per tick by using a loop and step().
In response to Garthor
Not exactly sure on how to do that. I looked up step() and all it seems to be used for is stepping a mob/obj in a direction.
In response to Yash 69
Maybe it's nigh time you learned how to program and to think.

Your "regular speed" using a Lag=1 in walk() causes a movable to take one step per one tick. Assuming you're using the default world.tick_lag, the time a tick takes is normally 0.1 seconds. Meaning the movable moves one step every 0.1 seconds.

There are only two ways to increase the movement rate beyond a step per a default tick:
1) Make it more more than one step in one tick. Since the players' clients are only updated at the end of every tick, from their point of view it will visually seem like the movable is teleporting 2 steps ahead at once each time it moves. Functionally, it is still walking, of course.
2) Make each tick take less time by decreasing world.tick_lag.
walk(obj,dir,delay)

If your using 1 for the delay. Why not just leave the delay at 0?
In response to Slic3y
Slic3y wrote:
walk(obj,dir,delay)

If your using 1 for the delay. Why not just leave the delay at 0?
That isn't true. I tried changing a tick_lag to 0 on a server and nobody could move, or do anything, and their icons were going really fast. I don't think he would want anyone to have seizures during playing his game.
In response to Narutorox123456
The only thing your post has to do with his post is the number 0.
In response to Narutorox123456
That's because it pushes Byond's memory to the limit. Also, think about it:

You're asking the atom to move from one place to another with no delay. AKA spontaneous teleportation?

"The only thing your post has to do with his post is the number 0." -- Garthor++