Help with making a better counter Created 8 years ago2015-06-05 14:15:40 UTC by Zerotech Zerotech

Created 8 years ago2015-06-05 14:15:40 UTC by Zerotech Zerotech

Posted 8 years ago2015-06-05 14:15:40 UTC Post #325803
I am in the process of making a better timer than the one kreedz use which used 2 buttons and a whole bunch of triggers and entities which can lag the game when you use it.

I have come up with making a more user-friendly timer, rather than pressing a button to start you walk into an area and it starts the timer.

If I can get this right, this could change all of the maps on CS1.6 and HL1.

The only problem I am stuck with is getting the timer to stop using pre-rendered sprites rather than textures to control the timer.

I can show you the map how it works but the stop timer is behaving strangely and i would like to know if there is a way to pause the env_sprite function. I know that cycler_spite you can pause the animation but can it be done the same thing with env_sprite?

Test map : active_timer_p5

So you can see the behaviour of the timer.

I can release the source code of what I have done if you are happy to help me fix up one thing and I can assure you I can provide the source code here if you were to make say for example, deathrun maps, bhop, kreedz climbing maps etc. which involve using timers.

Post your thoughts about this.
Posted 8 years ago2015-06-05 14:32:26 UTC Post #325804
I can't look at it since i'm at work, but I'm not sure what you're talking about when you're using sprites.
I have a clock laid out with lasers, but there's multimanagers controlling the timing logic.
By putting a trigger_relay in between the firings of the multimanagers, you can effectivley pause the clock.

Can you dive into specifics about how you want your sprite to behave, and what is going wrong?
Tetsu0 Tetsu0Positive Chaos
Posted 8 years ago2015-06-05 14:46:44 UTC Post #325805
What I can do is show you a demonstration on video. I can also post the source code if you wish so you can help me out figure out 2 major problems.

The idea of sprites is to act as an auto-controller which sprites uses sequences to change the animation of a frame. What I did was created 2 sprites so that it controls the output of the timer from 0 - 9 sequence which I have marked in ms and seconds and minutes and the 10 min and 10 seconds are controlled using 0 - 5 frame sequence.

What I am trying to do is to pause the animation say when it hit a marker and the timer displays currently at 4 for example it will freeze at 4.

Unfortunately the env_sprite does not behave that way and cycler_sprite does.

The reason I prefer env_sprite over cycler_sprite is to control the frequency of the output so I can change the speed slower or faster.

I will post a video of what I have done so far, and I can release the source code if you know how to fix that problem.
Posted 8 years ago2015-06-05 16:09:34 UTC Post #325806
Here is my video of what I have done so far.

Youtibe Video Link

I will post the source code soon, so if you are able to help me out what to do.

EDIT: Here is a HD video
Youtube HD Video Link
Posted 8 years ago2015-06-05 18:29:03 UTC Post #325811
To be honest, I'm not sure if you can pause sprites the way you're thinking.

From what I understand, you're using the framerate of the sprites to actually display the time... It seems that the engine doesn't actually know what time that clock is set at.

Since you can only toggle a sprite's visibility, and not directly set a frame number, I'm not sure if you can get this working the way you want.
We can probably figure out a way around this.
Tetsu0 Tetsu0Positive Chaos
Posted 8 years ago2015-06-05 23:57:58 UTC Post #325819
I know that cycler_sprite can work but I wasn't sure if env_sprite could do that. If it can, the current situation to create timers was to use textures and from the source code I have seen there is too many triggers to run it which could effectively cause fps loss and lag and would not be suitable for low powered machines although the game is designed to run on a low spec machine but not with too many triggers running at the same time.

Having sprites can reduce the amount of triggers needed to work, if this is possible this could change the way how speedruns are done.
You must be logged in to post a response.