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

[Trigger] Spawn multiple units by pressing button?

Status
Not open for further replies.
Level 5
Joined
Oct 11, 2009
Messages
125
I would like someone to tell me how I can spawn multiple units by selecting a button in something like a tavern. I need to have the spawned units teleport and change ownership but I can do that no problem. Any help?
 
Level 5
Joined
Oct 11, 2009
Messages
125
ummm I seem to have made a mistake?

This is what I made (I know it's not what you put down but it helped)

Events- Unit Mercenary Camp X (gen) sells a unit.
Condition-
Action-Unit-Create 5(Unit-Type(Sold Unit)) for (Player x (xxx)) at (xxx<gen>)

It creates 1 of the sold units right next to the camp and 5 mercenary camps at the region where the units should spawn!
 
Level 5
Joined
Oct 11, 2009
Messages
125
1. Yes I am sure I used sold unit.
2. Pharaoh what does that action do that isn't already being done (i know it's probably important but im just curious) and where do I find Set Point?
 
It moves your sold unit at the point where the rest units should spawn. This will have a total amount of 6 units. If you want 5 units, either create 4 units and move the unit or create 5 units and use the actions:
  • Unit - Kill (Sold unit)
  • Unit - Remove (Sold unit) from the game
Set Point1 is a variable; you store the location to remove it afterwards, because it causes memory leak. For more:
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/
http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Level 5
Joined
Oct 11, 2009
Messages
125
AAAAAH THANK GOD!!! Finally worked after I changed it from selling a unit to training a unit and than I added the remove unit from game action
 
Status
Not open for further replies.
Top