ID:156018
Jan 14 2011, 9:53 am
|
|
I'm looking for a system to make sleep go faster then sleep(1). I tried using sleep(0.5) but it executes as sleep(1). (1) would be ok in most cases, but with the way this looks ingame (1) is way too slow. I have 8 steps to the whole proc I'm making causing it to take a total of (8) to do and then (8) to end. This just makes the whole thing on screen look clunky. So I am looking for a way to make it go faster without removing sleep (which would cause the whole thing to happen at once losing the entire effect).
|
In response to JackSmoke
|
|
It's actually a pre attack move. If you have played Final Fantasy 6 you would know I'm trying to do. Just before a character attacks they do a little hop. I thought about putting some moves together but it just looks unsmooth when it appears on screen.
|
In response to Dpheonix7
|
|
Hmm,
I see, that's a hard nut. There's a "remove delay" variable on verbs for stuff like that, but I don't know if it helps you
set instant = 1
since you don't call any verbs but flicks in a row I suppose. |
Change world.tick_lag to lower value, then use sleep(world.tick_lag) either simply sleep(0.5), it'll sleep for one tick. If you need exactly 0.5, then set world.tick_lag to 0.5 and use sleep(0.5). But keep in mind your animations will increase speed too, so you'll have to make them slower.
|
In response to Ripiz
|
|
Ripiz wrote:
Change world.tick_lag to lower value, then use sleep(world.tick_lag) either simply sleep(0.5), it'll sleep for one tick. If you need exactly 0.5, then set world.tick_lag to 0.5 and use sleep(0.5). But keep in mind your animations will increase speed too, so you'll have to make them slower. Oh my god, it's Ripiz himself. What an honor. |
In response to JackSmoke
|
|
Uhm... What that supposed to mean? 0.o
|
In response to Ripiz
|
|
Ripiz wrote:
Uhm... What that supposed to mean? 0.o Well, the creator of the "GOA Planner", which was the first thing I tried to program from scratch to learn how to BYOND code. Never knew you were still active. Anyway, this is for the question, right? So sorry about the offtopic stuff here. |
In response to Ripiz
|
|
I'll look into that depending on how much editing I'll have to do for icons to make sure they are going at the proper speed if tick lag is changed.
|
To my knowledge it's not possible to get any time under 100ms, which is equally to sleep(1).
Maybe you could put some of those steps together to make 'em run in 400ms instead of 800.
Tip:
If it's an attack move, add a new state to your icon in which you attack for 1 frame with just a blurred hand