• 🏆 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!

[Solved] Units that sleep during day, or are somehow disabled during day.

Status
Not open for further replies.
Level 3
Joined
Feb 1, 2011
Messages
30
I am wondering is there is a simple solution to making units sleep during the day, or will there be some sort of trigger that disables them during the day. I have tried changing ally properties during night and day, but its not working, and its not really what i want.
 
Level 7
Joined
Jun 15, 2010
Messages
218
dunno what u realy want it for. But if u have like some sort of vampires that sleep durning day instead of night then give all these units a custom value (like example custom value 1) then make trigger that pauses the units when day time comes. also give them a item_ability that does nothing exept a sleeping model above there head zzZz.
Then make trigger that durning night all those unit with custom value 1 get unpaused and lose item_ability(whats only for the special effect)
To make it more a sleep-like thing u can also make trigger that if unit with custom value 1 gets attacked then unpauze en lose item_ability

example:

  • Day Time
    • Events
      • Game - The in-game time of day becomes Equal to 6.00
    • Conditions
    • Actions
      • Unit Group - Pick every unit in DAY_SLEEPERS_GROUP and do (Actions)
        • Loop - Actions
          • Unit - Pause (Picked unit)
          • Unit - Add SLEEP_ABILITY to (Picked unit)

  • Night Time
    • Events
      • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
    • Actions
      • Unit Group - Pick every unit in DAY_SLEEPERS_GROUP and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
          • Unit - Remove SLEEP_ABILITY from (Picked unit)

  • Make Day Sleepers
    • Events
      • Unit - A unit Begins training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Varimathras
    • Actions
      • Unit Group - Add (Trained unit) to DAY_SLEEPERS_GROUP
      • Unit - Set the custom value of (Trained unit) to 1

  • unsleep
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Custom value of (Attacked unit)) Equal to 1
    • Actions
      • Unit - Unpause (Picked unit)
      • Unit - Remove SLEEP_ABILITY from (Picked unit)

just make sure that the SLEEP_ABILITY is an item ability that does nothing exept the model art of the buf of sleep. (special effect)
 
Level 3
Joined
Sep 1, 2010
Messages
53
or you can make a custom buff, and use a condition to check if the unit has the buff, then unit sleeps or wakes up if it has the buff, you would only use 2 triggers then...

I am not in world editor now, so you do something like this:
the in-game time of day becomes equal to 6.00
then in the actions you do pick all units in playable map area matching conditions, the condition will be matching unit has the buff, and in the actions you just do what chasin225 said, in the other trigger make the same thing, but with the time 18.00
 
Status
Not open for further replies.
Top