• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Timer- Cinematic Madness

Status
Not open for further replies.
Level 23
Joined
Jul 26, 2008
Messages
1,317
Hihi guys,

So i have had this issue with my timers that I have tried multiple times to figure out myself, and my efforts have not brought any fruit, so i will try to explain my issue, and what I have done to try to solve it to help anyone looking at this eliminate potential causes.

Basically, I have Timers in my map, since I want my AI to trigger after the timers expire.
Below is an example of one of the colours. There is one trigger for the creation of the timer, one for the expiry of the timer, and then finally I added the key trigger for my issue- that once the timer expires, there is a trigger that initates my AI but more important sets the variables "COLOURorcstart=True"
(Of course at initialization the COLOURorcstart variables are equal to false)

I have four triggers just like this, except with different colours. Below the 3 triggers I have pasted, I have included pictures ( i did not paste the trigger as it has too much unnecessary stuff, but i can ), of what is contained in every single cinematic I have in my map. Essentially, at the start of every cinematic, the boolean variable is checked to see if the timer has expired, and if it has, it does nothing.
But if it has not expired, then it will pause the timer and hide it. The same thing happens at the end of every cinematic. The timer is unpaused and unhidden.

My issue is, two of the timers keep randomly becoming permanently hidden after a cinematic ends. The timer is 100% still functional, as the AI still triggers at the time it should start, but one timer just disappears. At first it was just one colour, so i thought it was an issue with that specific trigger, but later it happened to another.

Based on many of the problems I have been having with this particular map, I think it might have something to do with Two issues:

1) All the triggers that initiate the cinematics are "add trigger to the queue" based. This in itself should not be an issue, but I suspect the problem lies in conjuction with issue two- that is, that it possible due to gameplay choices to cinematics play almost immediately after the last one was played, and I think this is the issue with the timers disappearing.

The main reason I came here is because there is a logical connection for me that I do not understand about this issue, that is, even if something were going wrong in one cinematic, every single cinematic has the function to make a timer that has not expired unpause and unhide. So even if there were a problem in one of the cinematics (but I have checked very thoroughly and I have not found any), as soon as another cinematic is triggered it should resolve the issue.

But once the timer disappears, it never reappears (only 1 timer disappears every time I play, and has been one of two colours, with one colour in particular very likely to be the one that disappears.

Sorry for the word wall :p
I realize it was my mistake for making it possible for units to be able to trigger a cinematic almost immediately after the last one has played (due to the starting region being so small, and it being possible to run into all the regions that trigger the cinematics within seconds of each other).



  • Greenorc Start Timer
    • Events
    • Conditions
    • Actions
      • -------- 20 Minutes --------
      • Countdown Timer - Create a timer window for GreenOrc with title Discovery by Green ...
      • Set GreenOrcTimerWindow = (Last created timer window)
      • Countdown Timer - Show GreenOrcTimerWindow
      • Countdown Timer - Start GreenOrc as a One-shot timer that will expire in 1200.00 seconds


  • Greenorc Destroy Timer
    • Events
      • Time - GreenOrc expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy GreenOrcTimerWindow
      • Trigger - Run Green Peons <gen> (checking conditions)
      • Trigger - Run Green AI <gen> (checking conditions)

  • Green AI
    • Events
    • Conditions
    • Actions
      • Player - Add 99999 to Player 7 (Green) Current gold
      • Player - Add 99999 to Player 7 (Green) Current lumber
      • AI - Start campaign AI script for Player 7 (Green): war3mapImported\BDP03 Green Fel orc Ai v4.ai
      • Hero - Make Player 7 (Green) Heroes gain 0.00% experience from future kills
      • Hero - Learn skill for Gladiator 0149 <gen>: Immolation
      • Set GreenOrcstart = True


upload_2018-2-15_18-3-44.png





upload_2018-2-15_18-2-3.png







EDIT:

So I was replaying the map since I was curious if I waited a long time (30 seconds) between each cinematic if that would have any effect. When i did so, one of the timers disappeared, but this time, one was actually stuck behind another.

You can see it here (top right, behind the pink timer)


upload_2018-2-16_21-13-8.png




So it got me thinking, could it be because I am hiding and unhiding the timers in the wrong order?

I mean, i hiding them in the order blue green pink yellow, but also unhide them in this order. Does anyone know if it is necessary to unhide them in the opposite order they were hidden?
 
Last edited:
Level 23
Joined
Jul 26, 2008
Messages
1,317
EDIT: Can this topic be closed?

The solution was as i wrote above in my edit, it turns out you must unhide in the opposite order you hide in. I am not sure if the glitch caused was actually the timers disappearing, or if the timers writing was so similar that they were actually behind other timers and I just could not see them.

For people in the future who do this. The timers hiding must be in the opposite order as they were created. That is, when you unhide the timers, they should be in the same order that the timers were created in, and the opposite order that they were hidden in(for cinematics).
 
Status
Not open for further replies.
Top