[Trigger] how to detect night or day

Status
Not open for further replies.
  • my trigger
  • Events
    • Time - every 1 seconds of game time
  • Conditions
    • Game - time of day less than or equal to (your time)
  • Actions
    • Your actions!
 
  • Day-Time Trigger
  • Events
    • Game - Time of Day greater than or equal to 6.00
  • Conditions
    • Game - time of day less than or equal to 18.00
  • Actions
    • <Enable your ability>
  • Night-Time Trigger
  • Events
    • Game - Time of Day greater than or equal to 18.00
  • Conditions
    • Or
      • Game - time of day less than 6.00
      • Game - time of day greater than or equal to 18.00
  • Actions
    • <Disable your ability>
To make it so it says "Requires: - Day-Time" in the tooltip, which would look better, create an upgrade called "Day-Time", make 2 copies of your ability, 1 requires "Day-Time" upgrade, 1 doesn't. Then just swap between them (don't forget to swap the levels over aswell if it's a hero ability).
 
You can use the ability Shadow Meld. It checks time of day. Just make it so it doesn't make you invisable and it can be made to do damage ect I think. If it can't be used for a specific target type spell I'm pretty sure it can be an AoE or at the very least you can use a trigger to run it as an AoE.

If this fails try"Replinish Mana and Life" Ability. It has a "replinsh only at night" dependency. Remove all its healing effect etc. I'd suggest running it with triggers after that.
 
Why are you guys making it so hard? Make 1 Boolean variable called DayTime and 2 triggers:

  • Day time
    • Events
      • Game - The in-game time of day becomes Equal to 6.00
    • Conditions
    • Actions
      • Set DayTime = True
  • Night time
    • Events
      • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
    • Actions
      • Set DayTime = False
All you got to do for any trigger you need this for is add the condition to check if DayTime is True or False. For example:

  • Day time
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DayTime Equal to True
        • Then - Actions
          • Unit - Create 1 Normal Skeleton for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
        • Else - Actions
          • Unit - Create 1 Super Strong Skeleton for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
(That causes a Super Strong Skeleton to appear at night and a Normal Skeleton at day :wink:)
 
All you need is this
  • Night time
    • Events
      • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
      • Your
    • Actions
      • Your
  • Day time
    • Events
      • Game - The in-game time of day becomes Equal to 6.00
    • Conditions
      • Your
    • Actions
      • Your
 
Status
Not open for further replies.
Back
Top