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

Building then having it build its units automaticly

Status
Not open for further replies.
Level 6
Joined
Aug 31, 2014
Messages
137
So I've been making a map based off of an old Roc map but besides that point.

when someone builds there building I want it to start build right away do I need to trigger the building to start or can I use somekinda random mechanic so I don't have to trigger every buildings unit.

[trigger=mytrigger]{trigger}Building
Events
Unit - A unit Finishes construction
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Unit - Order (Constructed structure) to train/upgrade to a (Random level -1 creep unit-type)
Else - Actions
{trigger}[/trigger]

this is what I tried but did not work.

if you use -1 it means any level
 
Last edited:
Level 7
Joined
Jan 23, 2011
Messages
350
It won't work if the building doesn't have the unit in the list of available units for training.

If you want to make it random you have to create a unit-type variable with array, put each unit-type from 1 to 12 max, and then you put Variable[random number between 1 and 12] or whatever is your max
 
Level 7
Joined
Jan 23, 2011
Messages
350
(Random level -1 creep unit-type)
This, is a random value, it means that, there's a really little chance to select the Only unit in the building, why don't you put a condition on the trigger and the corresponding unit type?
 
Status
Not open for further replies.
Top