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

Diablo Elite Spawn Concept

Status
Not open for further replies.
Level 11
Joined
Aug 11, 2009
Messages
594
What I need is triggers that when spawning an Elite pack in my map, they should be given 1-4 passive abilities out of 8 possible. How many they get is based on game difficulty.

Normal: Each elite recieves 1 random passive ability.
Nightmare: Each elite recieves 2 random passive abilities.
Hell: Each elite recieves 3 random passive abilities.
Inferno: Each elite recieves 4 random passive abilities.

Lets just call the abilities A1, A2, A3 etc.
So when an Elite pack spawns the triggers should randomly give each elite some of these abilities (the whole pack should have the same passive abilities though). And it has to be different abilities, so if they first get A3, then the next ability they get cannot be A3.

I could easily make a loop myself to give them the abilities but I just dont know how to do it so when an ability has been picked it should be removed from the next loop.

Thanks for any help on this!
 
Level 23
Joined
Oct 20, 2012
Messages
3,075
I'll try it out.

EDIT:
Tried it out. Simple but it worked. :)

  • Set ability 1
    • Events
    • Conditions
    • Actions
      • Set int = (Random integer number between 1 and 8)
      • Set Abilities1[1] = Abilities[int]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Abilities1[1] Equal to War Stomp (Neutral Hostile 1)
        • Then - Actions
          • Trigger - Run (This trigger) (checking conditions)
        • Else - Actions
          • Set Abilities[int] = War Stomp (Neutral Hostile 1)
          • Game - Display to (All players) the text: (Name of Abilities1[1])
          • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            • Loop - Actions
              • Unit - Add Abilities1[1] to (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • hard Equal to True
                  • nightmare Equal to True
                  • normal Equal to True
            • Then - Actions
              • Trigger - Run Set ability 2 <gen> (checking conditions)
            • Else - Actions


War Stomp is used to check if the ability is chosen or not. Check out the map to check if that's what you really want.

I assume you know how to change the variables, unit groups and clean leaks so I didn't put much effort to it. :3
 

Attachments

  • Spells.w3x
    20 KB · Views: 72
Last edited:
Level 11
Joined
Aug 11, 2009
Messages
594
Thanks!
But this trigger Will only check the last given ability? So when They get 3 abilities it is possible that ability 1 and 3 can be the same or have I missed something?;)
 
Level 23
Joined
Oct 20, 2012
Messages
3,075
Did you check the map?

When the ability is added to the unit, it is replaced by warstomp so that it would not be available for the next ability. The ability can only be gained again on the next batch of units. If you know what you're doing, these triggers would be pretty easy to understand. :3

Well here's an better version of the test map anyhow, It automatically creates footmen every 5 seconds so that you can see what abilities they have.
 

Attachments

  • Spellsnew.w3x
    20.1 KB · Views: 45
Status
Not open for further replies.
Top