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

Getting a Created Unit To Build a Barracks

Status
Not open for further replies.
Level 3
Joined
Dec 30, 2015
Messages
33
Hello! I have had an issue with the world editor. I am trying to create a trigger where upon the death of a unit, a peasant in a region is created and will construct a barracks. I was able to create the peasant without an issue, but I cannot figure out how to order him to begin constructing a barracks. Is this possible? If so, how? Here is my current trigger:

Cruel Warden Death
Events
Unit - Cruel Warden (Default) 0017 <gen> Dies
Conditions
Actions
Destructible - Kill Cage 0001 <gen>
Unit - Create 1 Gary the Peasant for Player 6 (Orange) at (Center of Cage Region 1 <gen>) facing Default building facing degrees
Cinematic - Send transmission to (All players) from a Player 1 (Red).Peasant named Gary the Peasant at (Center of Cage Region 1 <gen>): Play No sound and display Thank you for freei.... Modify duration: Add 0.00 seconds and Wait
Player - Add 500 to Player 6 (Orange).Current gold
Player - Add 200 to Player 6 (Orange).Current lumber
Unit - Order (Last created unit) to build a Barracks at (Center of Barracks Region <gen>)
 

Attachments

  • Screenshot (744).png
    Screenshot (744).png
    23 KB · Views: 33
Level 39
Joined
Feb 27, 2007
Messages
4,992
What you’ve written seems it should work so the only things I can think are:
  • You’ve gotten the cost of the barracks wrong and the player actually doesn’t have enough resources.
  • There is not enough buildable space in that region so the barracks actually cannot fit there. You can check this by trying to manually place a barracks from the unit palette and seeing if it will let you.
 
Level 21
Joined
Dec 4, 2007
Messages
1,477
The barracks should be created in the center of region 1 i suppose?

You are referencing (Center of Barracks Region <gen>) instead
 
Level 3
Joined
Dec 30, 2015
Messages
33
I was able to fix it, it turns out the terrain had one square of unbuildable tiles. Thank you, I was able to get it done!
 
Status
Not open for further replies.
Top