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

How to create unit beside and order them move to attack when the building is build

Status
Not open for further replies.
Level 6
Joined
Mar 9, 2009
Messages
175
How to create unit beside the building and order them move to attack a point when the building is build ??? guys help Miii!!:goblin_jawdrop:


Example##: i use peasant build a Barrack and every 2 sec's spawn 2 footman and order unit target a point !:grin:

one more problem is : i wan player 1,2,3,4 build the barracks and the unit is create for player 5




:nemor:
 
Last edited:
Level 7
Joined
Dec 8, 2008
Messages
243
  • Event - Periodic Timer for 0.50 seconds
  • Conditions -
  • Actions -
  • Unit - Create 1 <unit> at position of <building> facing <default building angle>
  • Make <last created unit> attack-move to <location>
Or if you wanna be a good boy...

  • Event - Periodic Timer for 0.50 seconds
  • Conditions -
  • Actions -
  • Set Player_1_Barracks = RedsBarracks;
  • Set Location_of_where_to_move = L0cation
  • Unit - Create 1 <unit> at position <for player 5> of Player_1_Barracks facing <default building angle>
  • Make <last created unit> attack-move to L0cation
Perhaps, if the barracks can be constructed, then have a unit group for every barracks in the game, then have them added to that group when the barracks is built, and have

for every unit in <barracks_unit_group> do actions
-building 1 <unit> for <player 5> at position of <picked unit>
 
Status
Not open for further replies.
Top