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

Day/Night Mob Systems

Status
Not open for further replies.
Level 12
Joined
Jan 30, 2009
Messages
1,067
Hello!

Couldn't think of another way to word it that wasn't a long-winded explanation... Here's what I'm talking about:

You know how in the Pokemon handheld games, from Silver/Gold onward, there's often different pokemon that you can find depending on the time of day (Morning, day, night)? Well, I was wondering if a similar two-tiered system would be possible to construct in wc3. Specifically Day and Night.

Something along the lines of there being two separate unit lists with units which can appear during either day or night.
For example, Wolves would appear only at night, since they are mostly nocturnal, whereas a humanoid unit may appear only in the day time since they sleep at night.

Also, if possible, a way to add some units to both lists, so that they appear in both daytime and nighttime, although perhaps varying amount of time.

In the map, I've got a random battle system which is where this thought came from. I haven't really fiddled with it too much yet, but I didn't notice such an option whilst perusing it.

Any suggestions, or is it even possible?
Help is appreciated, and I do follow my signature!
 
Last edited:
Level 6
Joined
Jan 31, 2009
Messages
166
I would just put my three lists (morning night day) into three unit arrays and then use if then statements to detect the time of day. Then spawn a random unit from the array.

  • Initilise variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set DayUnits[0] = Footman
      • Set DayUnits[1] = Rifleman
      • Set DayUnits[2] = Knight
      • -------- Continue on like this for all the day units you want and make 2 more arrays for night, morning, whatever --------
  • Demo
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (In-game time of day) Greater than or equal to 10.00
              • (In-game time of day) Less than or equal to 20.00
        • Then - Actions
          • Unit - Create 1 DayUnits[(Random integer number between 0 and 3)] for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
        • Else - Actions
Just put the first trigger (after filling out all three arrays with whichever units you want) in your initializations trigger. Then put the actions from the second trigger (+ 2 more if then else statements for night and morning adjusting the times as you need)

Hope that helps
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Well, that does confirm my suspicions on unit arrays.

I will see what I can do with this info, thank you. +Rep given. :)
 
Status
Not open for further replies.
Top