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

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