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

wonder if sum one could make me this

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
  • Tavern Hero Chosen
  • Events
  • Unit - A unit Sells a unit
  • Conditions
  • And - All (Conditions) are true
  • Conditions
  • ((Sold unit) is A Hero) Equal to True
  • Or - Any (Conditions) are true
  • Conditions
  • (Selling unit) Equal to Tavern 0000 <gen>
  • Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] Equal to True
  • Then - Actions
  • Unit - Remove (Sold unit) from the game
  • Game - Display to (All players) the text: You already chose a...
  • Else - Actions
  • Set Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] = True
  • Unit - Move (Sold unit) instantly to (Center of HeroSpawn <gen>)
  • Player Group - Pick every player in (All players) and do (Actions)
  • Loop - Actions
  • Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Picked player)
  • Camera - Pan camera for (Owner of (Sold unit)) to (Center of HeroSpawn <gen>) over 1.00 seconds
  • Selection - Clear selection for (Owner of (Sold unit))
  • Selection - Add (Sold unit) to selection for (Owner of (Sold unit))
if sum one could make this on a map so i could paste it in my map and see how its done :S i dont find every thing :S im beginner in this O:
 
Jesus christ, would it be that hard just to make it yourself?
The first step would be to open the trigger editor, and manage your map's variables. Create a Bolean and call it HeroAlreadyPicked or somthing. Dont forget to check the array box, and type 12. Next, you have to understand the trigger. In the If/Then/Else part, if the condition in the If spot is satisfied, then the actions in the Then spot will run, but if the condition isn't satisfied in the If spot, then the actions in the Else section will run. In this case, the condition in the If spot is the variable you made. The trigger asks the computer if that variable is true or false. If it is true, then the actions in the Then spot will run, thereby removing the sold hero and creating a message to that player. But if the variable is false, the the actions in the Else spot will run. The actions in that spot tell to move the sold hero to the center of a region, pan the camera of the buying player to the center of that region, select the sold unit, and set the variable in the If spot to true. That way, if the same player tries to buy another hero, it will be removed, and the player will get a message saying that he cant have 2 heros. I hope this helps.
 
Status
Not open for further replies.
Top