• 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.

[Trigger] Need trigger help for my map

Status
Not open for further replies.
Level 1
Joined
Oct 24, 2008
Messages
5
Need some help... How to make that every hero has random ability? I put trigger edited to look similar to this:

World-Editor Tutorials Site

but doesn't work :confused:

Also I read about leaks but I dont know how to check for this... Need help for that too :smile:
 

Attachments

  • test v0.01.w3x
    23 KB · Views: 43
Level 18
Joined
Aug 23, 2008
Messages
2,319
Just set a random number between 1 and x (where x is the amount of abilities that can be given). and then make If/Then/Else triggers (If RANDOM (which is the random number variale) equal to 1, then add e.g. Flame Strike to the hero. If RANDOM equal to 2, then add Blizzard to the hero. Etc.)
 
Level 1
Joined
Oct 24, 2008
Messages
5
Well if u tested the map there is not a icon in the hero for the ability >> not assigned ablility to the hero. That's my problem to be precise.

The trigger "Hero spawn and notifications":

  • Hero spawn and notifications
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Game - Display to Player Group - Player 1 (Red) for 15.00 seconds the text: To kick someone typ...
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to Is playing
            • Then - Actions
              • Set random_spell = (Random integer number between 1 and random_count)
              • Unit - Create 1 Pakamuru for (Picked player) at ((Picked player) start location) facing (Center of (Playable map area))
              • Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Unit - Add spells[random_data[random_spell]] to (Picked unit))
              • Camera - Pan camera for (Picked player) to ((Picked player) start location) over 1.00 seconds
              • Set random_data[random_spell] = random_count
              • Set random_count = (random_count - 1)
              • Game - Display to (All enemies of Player 1 (Red)) for 10.00 seconds the text: Type -help to see a...
            • Else - Actions
              • Do nothing
Custom abilities for now are 4, soon they will be 12 (one for each player).
 
Status
Not open for further replies.
Top