• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Solved] Unit Attack

Level 9
Joined
Mar 26, 2020
Messages
209
Hi hivepips, can anyone try creating this scenario or is it even possible with GUI:

custom unit (any range but i guess rifleman will do)
by day nothing changes, shooting enemies from afar
by night, i want the attacks to be disable like only running no attacks

i tried creating it but i find it complex and has unfinished trigger on what i should do, anyway this is the draft...
  • Test Attack
    • Events
      • Game - The in-game time of day becomes Equal to 12.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A ground unit) Equal to True
        • Then - Actions
          • Unit - Interrupt Rifleman 0001 <gen>'s Attack
        • Else - Actions
 
Your trigger can't work because triggering unit refers to nothing as there is no unit event, so here's one way:

  • Night
    • Events
      • Game - The in-game time of day becomes Greater than 18.00
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on Day <gen>
      • Unit - Add Cargo Hold (Orc Burrow) to Rifleman 0000 <gen>
  • Day
    • Events
      • Game - The in-game time of day becomes Greater than 6.00
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on Night <gen>
      • Unit - Remove Cargo Hold (Orc Burrow) from Rifleman 0000 <gen>
One of the two must start disabled depending on what time of the day it is at map start. The cargo hold trick prevents an unit from attacking and removes the attack button from the command card. That would only work for pre-placed units though, if players can train units then you'd have to add/remove the ability depending on the time of the day
 
One of the two must start disabled depending on what time of the day it is at map start. The cargo hold trick prevents an unit from attacking and removes the attack button from the command card. That would only work for pre-placed units though, if players can train units then you'd have to add/remove the ability depending on the time of the day
ohh, i forgot orc burrow has this, but just hold ability will do just fine? :con:
--
no, just pre-placed specific units only
 
Back
Top