• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Vote for the theme of Hive's HD Modeling Contest #7! Click here to vote! - Please only vote if you plan on participating❗️

Abilities available only at night

Status
Not open for further replies.
Level 4
Joined
Apr 3, 2008
Messages
111
I'm no good with triggers AT ALL i can only make basic trigs like chat commands unit enters regions easy stuff like that, now im not asking asking for somebody to make me some spells, but can some1 please tell me what i need to do to get spells that can only be used at night, say around midnight?
 
what you need:
1. your ability
2. a research (call it midnight ors sth like that
3. copy your ability and add the research to your ability (Requirements)
4. a new trigger

  • Midnight
    • Events
      • Game - The in-game time of day becomes Equal to 22.00
    • Conditions
    • Actions
      • Unit - Remove YourAbility from (YourUnit)
      • Unit - Add CopiedAbility to (YourUnit)
  • Midnight
    • Events
      • Game - The in-game time of day becomes Equal to 6.00
    • Conditions
    • Actions
      • Unit - Remove CopiedAbility from (YourUnit)
      • Unit - Add YourAbility to (YourUnit)
//Edit, wait that won't work... I'm looking for an other solution
//Edit2, that should work
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Or you can make custom upgrade called ''Cannot work on Day'' or something like that and set it to ability Techtree Requirements (Note that Check Dependencies must be true). After, implement these triggers:
  • Night
    • Events
      • Game - The in-game time of day becomes Equal to 22.00
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Player - Set the current research level of <Your Upgrade> to 0 for (Player((Integer A)))
and

  • Day
    • Events
      • Game - The in-game time of day becomes Equal to 22.00
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Player - Set the current research level of <Your Upgrade> to 1 for (Player((Integer A)))
 
Level 4
Joined
Apr 20, 2009
Messages
106
Unfortunately (at least with my editor), you are unable to down-grade your upgrades, so I would suggest setting the spell requirements to a Unit named Needs to be Night to Use, or something like that, and then creating that unit every night, storing it in an array, and then wiping it out in the morning. If you need to see a trigger, I can put one together.
 
Status
Not open for further replies.
Top