• 🏆 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] Critical error

Status
Not open for further replies.
Level 9
Joined
May 30, 2008
Messages
430
This is triggered aura that is active when is night and inactive when is day "defense reduction aura". The problem come when is night as far as i see, and it appears at random time of gameplay some times after 4-5 minutes some time after 20. If you know how to fix this please tell me or tell me another way to do it (ability is for more than 1 hero (unit) ). Here is my trigger.
  • Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Night
    • Actions
      • Set DayNightHero = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Night for (Learning Hero)) Equal to 1
        • Then - Actions
          • Unit - Add Night (for ability) to (Learning Hero)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((In-game time of day) Greater than or equal to 18.00) or ((In-game time of day) Less than or equal to 6.00)
        • Then - Actions
          • Unit - Set level of Night (for ability) for (Learning Hero) to ((Level of Night for (Learning Hero)) + 1)
        • Else - Actions
  • Day
    • Events
      • Game - The in-game time of day becomes Greater than or equal to 6.00
    • Conditions
    • Actions
      • Unit - Set level of Night for DayNightHero to ((Level of Night (for ability) for DayNightHero) - 1)
      • Unit - Set level of Night (for ability) for DayNightHero to 1
  • Night
    • Events
      • Game - The in-game time of day becomes Greater than 18.00
    • Conditions
    • Actions
      • Unit - Set level of Night (for ability) for DayNightHero to ((Level of Night for DayNightHero) + 1)
 
Level 9
Joined
May 27, 2006
Messages
498
I remember seeing somewhere a tutorial how to make ability of this sort... Dont remember where, it was connected to DotA, though.

Anyway, you'd have to use 2 events or an additional condition, checking if the time of day is less than some value (to define the day/night-time).

Edit:
Similar thread here:
http://www.hiveworkshop.com/forums/f269/how-detect-night-day-104181/, check Lord_Bones's post.

Edit2:
300th post, duh.
 
Status
Not open for further replies.
Top