• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Automatic unit creation triggers

Status
Not open for further replies.
Level 2
Joined
May 18, 2019
Messages
20
i know this thread is here somewhere, but search doesn't want to cooperate in finding it (it doesn't work for me somehow, idk if it works for you guys) can someone provide link for that thread please?
 
Level 2
Joined
May 18, 2019
Messages
20
I want a building to produce units automaticaly for the player (for example red) that captures them under his control but only if they are in the ownership of that player when they are neutral i want them to do nothing
Also if possible set rally point without player's command and if the different player captures them (for example blue captures red's building) so the rally point switches to blue's preference of rally points
I hope it's understandable
 
Level 24
Joined
Jun 26, 2020
Messages
1,853
You can try (Assuming you have your system to capture that barracks)
  • Events
    • Unit - A unit changes owner
  • Conditions
    • Unit-type of (Triggering Unit) Equal to "Your barracks"
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Owner of (Triggering unit) is not equal to Neutral Passive
      • Then - Actions
        • Unit - Order (Triggering Unit) Training "Your unit"
        • Set Temp_Loc = "Your rally point"
        • Unit - Set Rally Point of (Triggering Unit) to Temp_Loc
        • Custom script: RemoveLocation(udg_Temp_Loc)
      • Else - Actions
        • Unit - Replace (Triggering Unit) to with a (Unit-Type of (Triggering unit)) (This is the unique way to cancel training)
To loop the training
  • Events
    • Unit - A unit finishes the training of a unit
  • Conditions
  • Actions
    • Unit - Order (Triggering unit) train (Unit-type of (Trained unit))
 
Status
Not open for further replies.
Top