ID:273608
![]() Oct 9 2010, 9:56 am
|
|
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.
|
![]() Oct 9 2010, 10:00 am
|
|
Make it take two steps per tick by using a loop and step().
|
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.
|
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? |
Slic3y wrote:
walk(obj,dir,delay)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. |