Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Countdown timer issues
Countdown timer issues
Apr 14 2011, 8:55 pm
By: theleo_ua  

Apr 14 2011, 8:55 pm theleo_ua Post #1



Goal 1: to loop some conditions by countdown timer

Example: if countdown timer is at most 0:05 > then create units and set coundown timer to 1:00.

Goal 2: to make custom acid colors for some players (color values 16-255)

Problems: sometimes countdown timer does not set to 1:00 when reaching 0:05, and we have next: 0:05 0:04 0:03 0:02 0:01 0:00 OFF - after this countdown timer goes offline for approximately 1-5 minutes. And after this countdown timer resetting to 1:00 and after going ok.

I noticed, that this start happening only after I added acid colors, but I like this colors (even if some windows 7 users have incorrect colors because of special memory model in WIN7) and I dont want to disable them.

Any ideas how to fix this bug?

I attached my maps (castle fight use timer condition from the very beginning, and crazy cpu after 8 minutes of the start).
While I played, this error happened only (approximately) in 15th minute, and only in 5% of games.

Thank you in advance.

Attachments:
CASTLE_FIGHT_7.31.SCX
Hits: 2 Size: 99.04kb
LT_WITH_CRAZY_CPU_5.11.SCX
Hits: 1 Size: 113.39kb



None.

Apr 14 2011, 8:58 pm DevliN Post #2

OVERWATCH STATUS GO

I can't open the maps from where I am now, but are you using Hyper Triggers? Would you have any conflicting waits in another trigger that may be messing with it?



\:devlin\: Currently Working On: \:devlin\:
My Overwatch addiction.

Apr 14 2011, 9:21 pm theleo_ua Post #3



Quote from DevliN
I can't open the maps from where I am now, but are you using Hyper Triggers? Would you have any conflicting waits in another trigger that may be messing with it?

I use hypertriggers in castle fight and dont using them in crazy cpu.

About waits:

Castle fight: I checked the map and didnt found any waits in countdown timer triggers

Crazy Cpu: LOL - I found some waits in this triggers and now I really dont know why they are here (because this triggers were made 11 years ago - maybe this wait is some trick to randomize cpu AI behavior, but I may be wrong). So maybe this is because of this waits, but I really dont understand, why the problem start happening only after I added custom colors.

So I will try to fix Crazy CPU triggers, but I still didnt get, why this happening in Castle Fight

Post has been edited 2 time(s), last time on Apr 14 2011, 9:34 pm by theleo_ua.



None.

Apr 14 2011, 9:53 pm DevliN Post #4

OVERWATCH STATUS GO

With a death counter, you could eliminate Wait triggers entirely (aside from creating the Hypers that is).



\:devlin\: Currently Working On: \:devlin\:
My Overwatch addiction.

Apr 14 2011, 11:04 pm NudeRaider Post #5

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Having seen your CASTLE FIGHT triggers from an early version I bet it's a wait block.

It's also the only thing I can think of randomly delaying the execution of triggers.




Apr 15 2011, 12:04 am Lanthanide Post #6



In extensive messing around with countdown timers in DS Night Fixed, I have to concur with Nude and Devlin.

The countdown timer itself is pretty simple, the only knack to it is that when using hyper-triggers you'll usually get 8 or so trigger fires for each second displayed on the timer (so a trigger with condition "countdown timer exactly 3" would execute 8 times). Other than that, there's nothing really tricky about it.



None.

Apr 15 2011, 8:11 pm RyuNinjao_o Post #7



You never need waits. Instead, your systems should all be timed like this.

When you use waits, you never use them in a looping trigger, except for a hyper.

The reason we do it in hyper triggers is because every time there is a wait, the game checks every single trigger. If we wait 0 milliseconds and have it check every trigger for every 0 milliseconds, it takes a lot less time for the game to go through the list of triggers.

If you have like 5 hypers set up, it will take something like 367 hours to finish. THE ONLY TIME YOU USE WAITS. If you use a 5000 wait, it will check all triggers once and then wait 5000 milliseconds to do it again.

Have your clock run as usual.

To simulate 26 seconds with hyper triggers we want 26 x 12, which gives us 312.

So we have 300 death counts

Trigger:

Condition: Player 1 has exactly 0 death counts for bishibosh.
(what ever other conditions that apply here)

Actions: Set Death Count for player 1 to 312.
Preserve Trigger.

Trigger 2:

Condition: Player 1 has at most 312 death counts for bishibosh.
(what ever other conditions that apply here)

Actions: Subtract 1 death count for bishibosh.
Preserve Trigger.

Trigger 3: Set countdown timer to sync so that when the deathcount reaches 0, the units spawn.

When the 5 seconds extra happens we want to wait till 0:01 and then set the loop to go again.

In your trigger to make the units spawn, you want the deaths for bishibosh to be at 1. If you put 0 or 312, it will not work.

Post has been edited 1 time(s), last time on Apr 15 2011, 8:19 pm by RyuNinjao_o.



None.

Apr 15 2011, 8:13 pm DevliN Post #8

OVERWATCH STATUS GO

I think the idea is that he wants the actual countdown timer displayed, so a death counter for that wouldn't help.

Post has been edited 1 time(s), last time on Apr 15 2011, 11:19 pm by DevliN.



\:devlin\: Currently Working On: \:devlin\:
My Overwatch addiction.

Apr 15 2011, 8:22 pm RyuNinjao_o Post #9



Quote from DevliN
I think the idea is that he wants the actual countdown timer displayed, so a death counter for that wouldn't help.

Why not just have both and use the countdown timer's position as a condition.

When the clock hits 0:01 you repeat the process.

The first time, you can just have them spawn.

Post has been edited 1 time(s), last time on Apr 15 2011, 11:20 pm by DevliN. Reason: Fix'd.



None.

Apr 15 2011, 11:19 pm DevliN Post #10

OVERWATCH STATUS GO

Why bother with a death counter if you're going to use the countdown as a condition...?

You don't gain anything special in this case. I suggested death timers earlier to get rid of any possible Wait actions used in other triggers since that is what is causing the issue, but spawning with a countdown timer otherwise is perfectly fine.

Post has been edited 1 time(s), last time on Apr 15 2011, 11:26 pm by DevliN.



\:devlin\: Currently Working On: \:devlin\:
My Overwatch addiction.

Apr 16 2011, 8:38 am Gigins Post #11



The thing he doesn't get is that wait blocks delay all triggers from running not only the ones with waits in them.



None.

Apr 16 2011, 9:22 am RyuNinjao_o Post #12



Quote from Gigins
The thing he doesn't get is that wait blocks delay all triggers from running not only the ones with waits in them.

Well, someone should go and do a little reading then.

Contrary to deviln, I was only suggesting death counts incase he wanted something more than just the timer.

A DC timer has a way huger list of options, that's why I recommend it.



None.

Apr 16 2011, 11:02 am Gigins Post #13



Tell me something new. The point was that nobody told him that wait blocks affect all triggers, he obviously thinks it blocks only triggers with waits in them. As he said, that his countdown timer triggers doesn't have any waits in them.

Of course waits should be avoided by any means. DC are much better and more precise as game speed settings change their speed as well.



None.

Apr 16 2011, 12:42 pm NudeRaider Post #14

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Gigins
Tell me something new. The point was that nobody told him that wait blocks affect all triggers
That's not true. Wait blocks only affect (block) the trigger that is run while another wait is already running. If the blocked trigger is the one containing the actions you want to run you need to replace the wait with a dc.

If the blocked trigger is a hyper trigger AND hyper triggers are only owned by this same player (or all other players's hypers have been blocked too) then the hyper effect will stop and every dc timed event will take 12 times longer.




Apr 16 2011, 7:19 pm Moose Post #15

We live in a society.

As a general note, for the method you're using (Wait 0ms x 62 times x 3 triggers), you want those hyper triggers to come LAST. There have been cases where I couldn't guarantee any slot in the game would always be filled and I still needed to use waits. (Uberena is one) I run the hyper triggers for All Players and so long as every single player is not running a wait simultaneously, those hypers will keep going.

Just adding this an an informational tidbit. It doesn't actually apply to your map because the player who owns the hyper triggers does not have any other waits.




Apr 16 2011, 8:21 pm DevliN Post #16

OVERWATCH STATUS GO

Quote from RyuNinjao_o
Contrary to deviln, I was only suggesting death counts incase he wanted something more than just the timer.

A DC timer has a way huger list of options, that's why I recommend it.

Quote from DevliN
With a death counter, you could eliminate Wait triggers entirely (aside from creating the Hypers that is).

I don't see how that is contrary to me. :/



\:devlin\: Currently Working On: \:devlin\:
My Overwatch addiction.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:41 am]
Ultraviolet -- 🤔 so inf is in you?
[04:57 am]
O)FaRTy1billion[MM] -- my name is mud
[04:35 am]
Ultraviolet -- mud, meet my friend, the stick
[10:07 pm]
lil-Inferno -- nah
[08:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[05:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[05:24 pm]
lil-Inferno -- poopoo
[05:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
[03:36 pm]
NudeRaider -- :lol:
[2024-5-16. : 3:02 am]
Ultraviolet -- I'm gonna send inf to have sex with their moms
Please log in to shout.


Members Online: Ultraviolet, 5sophiee58100yp3