• 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.

passive unit-type night spells

Status
Not open for further replies.
Level 2
Joined
Sep 4, 2008
Messages
11
I'm trying to make 2 spells, both of them only active at night:

the first one gives a speed bonus (so i guess a kind of endurance aura) to every unit of a particular unit type

and the second one gives permanent invisibility to every of a particular unit type.

I tried messing around with triggers to make it all work but I can't get it right and I'm just completely lost right now. I looked around the site but the only help I can find seems to be for a particular hero.

Can someone help explain to me what I need to do with the triggers to give/take away these abilities from these unit types during the day/night please?
 
  • Night
    • Events
      • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • -------- Put in the conditions bit for whichever units you want to give the ability --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Footman
            • Then - Actions
              • -------- add speed bonus --------
              • -------- add invisibility --------
            • Else - Actions
  • Day
    • Events
      • Game - The in-game time of day becomes Equal to 6.00
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • -------- The below if/then/elses filters out units with the abilities only --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Item Move Speed Bonus for (Picked unit)) Greater than 0
            • Then - Actions
              • -------- remove speed bonus --------
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Permanent Invisibility for (Picked unit)) Greater than 0
            • Then - Actions
              • -------- remove invisibility --------
            • Else - Actions
 
There was thread about Night Stalker from dota last time and someone did the same mistake as you did GhostThruster.

Using 'Equal to' in this case is inaccurate and can easily be avoided by other interactions with night. Any trigger that sets day/night time to > 18.00 and < 6.00 will abuse your function. Furthermore, even Moon Stone sets by default game-time to 24:00 - skipping everything you have worked on.

It's always nice to use loop with conditions:
  • Conditions
    • (In-game time of day) Greater or eqaul to 18.00
    • (In-game time of day) Lower than to 6.00
Using 'Events - (In-game time of day) becomes (...)' can work too, although in loop egzample we can always reduce the amount of 'looping' via periodic increase -> for this trigger we need just 0.5-1.00 checking period.
If you wanted to stick with your solution, saying that adding additional actions (in 'those rare' situations (mentioned already)) to other triggers to prevent abusing - I would say no, it's totaly inefficient.
 
You didn't get it or? I couldn't understand whats the meaning of this sentence.
Any action performed by trigger: Set (In-game time of day) to X value when X is greater than 18 but lower than 6 will ignore triggers above + any moon-stone based item that do not set in-game time to 18 or 6 will do exactly the same.

I would recommend to be accurate in such cases.
 
Status
Not open for further replies.
Top