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

[Trigger] Random hero Picker

Status
Not open for further replies.
Level 1
Joined
Jul 19, 2010
Messages
5
I have a problem with my, -random command. the trigger spawns all players on my list but I want it to spawn 1. I used a hero tavern. Here are the triggers.

Events:
Player-Player 1 red types a chat message containg -random as An exact match

Conditions
(Number of units owned by (Triggering player) matching (((Matching unit) is a Hero) Equal to True))) Equal to 0

Actions
Set Random = ( Random integer between 1 and 2)
If (All conditions are true) then do (Then actions) else do (else actions)
If-conditions
Random Equal to 1
Then-Unit Create 1 Frozen Wolf for Player 1 (Red) at (Center of Hero Mover <gen>)facing default degrees
Unit Create 1 Ice Mage for Player 1 (Red) at (Center of Hero Mover <gen>)facing default degrees
Else-Do Nothing
Set Random=2
Unit-Remove Circle 0006 <gen> from the game
Camera-Pan Camera for Player 1 (Red) to (Center of Hero Mover <gen>) Over 0.00 seconds
Player Group- Pick every player in (All players) and do (Actions)
Loop-Actions
Player- Make (Unit-type of (Last created unit) Unavailable for training/construction by Player 1 (Red)
Player- Make (Unit-type of (Last created unit) Unavailable for training/construction by Player 2 (Blue)
Player- Make (Unit-type of (Last created unit) Unavailable for training/construction by Player 3 (Teal)



Those are my trigger I don't know what to do next. The variable (Random) is an Integer Variable with the intial value default. Also if the Trigger to add includes a variable please show how to make it because I dont know them that well.
 
Status
Not open for further replies.
Top