• 🏆 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!

[Solved] Night/Day Trigger

Status
Not open for further replies.
Level 4
Joined
Feb 9, 2010
Messages
48
Greetings, I'm trying to implement a system for faction in game that during night, enables some abilities, empowers others, and that kind of stuff. Anyways, I'm having problem with following trigger:

image.png


Everything is working almost fine and properly in game. When the day hits, the trigger does the stuff for day, when night hits, the trigger does the stuff for night.

However.

When I'm using an ability of some units, everything literally fcks up, and when the day hits, the trigger instead of doing day stuff, it does the night stuff. Yeah, like what the hell.

It's not just one ability that 'destroyes' this trigger, but more than that. Some of them are triggered, some are not. It's kinda awkward as hell, but what I'm sure of, is that none of those abilities should mess up the trigger, aka they have no trigger connected that would alter the 'Night time Copy 2' trigger, or does not alter time of the day.
Example of such spell can be: altered soul burn, scroll of speed. (Non triggered)

Anyways, when the triggers get messed up, and does 'night' stuff when the game time changes to 'day', it can be somehow fixed by using "artifical night" spell, which I have on diffrent unit. After artificial night expires, the trigger seems to be working correctly. (Artificial Night spell has a trigger attached when cast, with one action: "Run Night time Trigger".)

I'm kinda clueless as to what is causing the problem. I've been trying to trace the problem to abilities that 'mess' up the trigger, but they are just fine, atleast it seems so for me.

Help is much appreciated. Thanks in advance
 
Level 14
Joined
Oct 8, 2012
Messages
498
In the Events, try using equal to instead of greater than and less than.
Same with the condition.

Edit:
  • Trigger Yay!
    • Events
      • Game - The in-game time of day becomes Equal to 6.00
      • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (In-game time of day) Equal to 18.00
        • Then - Actions
          • Set TempString = Goodnight.
        • Else - Actions
          • Set TempString = Goodmorning.
      • Game - Display to (All players) the text: TempString
Works for me.
Edit2: Simplified it.
 
Last edited:
Level 4
Joined
Feb 9, 2010
Messages
48
It seems like the greater than/less than had some flaws, not sure where, but had it. The Equal to works as intended and fixed the problems. I had to rearrenge the trigger for artificial night, but that's nothing major, the thing that matters is that the night/day system works as it should be.

Thanks for the help
 
Status
Not open for further replies.
Top