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

[Trigger] Wolf Pack .

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
Wolves hunt as packs so you will want to move a unit group of wolves around randomly and not just each member.

Part 1: Hunt start
Part 2: Hunt activity
Part 3: Hunt stop
Part 4: New Wolves

Part 1 is a trigger with even based on time of day when they should start hunting. All it does is turn on Part 2.
Part 2 is the actual hunt trigger and is initially off. It uses a periodic event (every 30 seconds odd) to get the wolves to move around randomly. More advanced AI could be used (such as them hunting in a certain random area) but basically you order all wolves in the wolf pack group to go somewhere.
Part 3 runs when the wolves should stop hunting (time of day event). It then orders the pack back to the lair and turns off Part 2.
Part 4 runs somewhere between Part 2 and Part 1 (time of day event) when the wolves are in the lair and respawns any dead wolves. Could even be a periodic trigger that is turned on by Part 3 and off by Part 1 but the exact implementation is up to you.
 
Level 19
Joined
Apr 21, 2013
Messages
1,194
I'm not that experienced but i'll give it a try :D

  • StartHunt
    • Events
      • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
    • Actions
      • Trigger - Turn on (HuntActivity)
  • HuntActivity
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (wolfPack)) and do (Actions)
        • Loop - Actions
          • For each (Integer A) from 1 to 10, do (Actions)
            • Loop - Actions
              • Unit - Order Picked Unit to Move To huntingLoc[Integer A]
  • HuntStop
    • Events
      • Game - The in-game time of day becomes Equal to 4.00
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (wolfPack)) and do (Actions)
        • Loop - Actions
          • Unit - Order Picked Unit to Move To lairLoc
    • Trigger - Turn off (HuntActivity)
  • New Wolves
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to packWolf
    • Actions
      • Wait 2.00 seconds
      • Hero - Instantly revive Dying Unit at (respawnPoint), Hide revival graphics
I think this is the basic structure of what you want, btw of course there are bugs and issues in these triggers you gotta solve them out by yourself :D

hope this helped :)
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
Can you give a trigger ???? I mean can you post a trigger ???? :D
No because then I would be writing your map for you and you would never learn to do things yourself. I already told you the pseudo code for the triggers needed (you just had to translate them into GUI and it should work).

Sorry, but this cause a lag . . .
Please elaborate. Does it cause performance problems (frame skipping) or latency (orders take unreasonable time to respond)?

In any case his triggers made no sense. Specifically the "For each (Integer A) from 1 to 10, do (Actions)" part which does nothing but waste a lot of processor time since it will always use index 10. This is why I never said such a part in my pseudo code like writing.

The revive dead unit also only works if the wolves are heroes (unlikely?). You will need to create new ones instead or use a unit recycling system to re-use the same wolf units again and again.
 
Status
Not open for further replies.
Top