Warcraft III resources & community, 2003–2006 · archived

Create mulitiple units with barracks..

8 posts
#1

Create mulitiple units with barracks..

I have been creating a melee map with a modern concept. All units and upgrades are "modernized".

I want to give the option to build a squad of units (4) in addition to the regular single unit.
Is this possible?>
If so could someone give me the general idea so I can play with the triggers if needed.
#2
action: unit finish training unit

training unit = ur thing

create 3 -ur units- at point of triggering unit
#3

Thanks

Thank you ur my hero... no really you are. I was over thinking it... what a newb I am. Thanks again.
#4
actually

heres a WAY better way

(doesnt leak, cause of a global var called loc that is type Point )

For Each Integer A from 1 to for
set loc = Unit - position of Trained Unit
Create 1 (yourunit) at loc facing facing of Trained Unit degrees
Custom Script: call RemoveLocation( udg_loc )
set loc = Position of Training Unit's RallyPoint
order Last Created Unit to move to loc
Custom Script: call RemoveLocation( udg_loc )
#5
Events
    Unit - A unit Finishes training a unit
Actions
    For each (Integer A) from 1 to 4, do (Unit - Set Rally-Point for (Triggering unit) to (Rally-Point of (Triggering unit) as a unit))
    Unit - Create 1 (Unit-type of (Trained unit)) for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
    

Custom script:   RemoveLocation(udg_loc)
    Unit - Set Rally-Point for (Trained unit) to (Rally-Point of (Triggering unit) as a unit)
    Unit - Order (Last created unit) to Move To (Rally-Point of (Triggering unit) as a point)
    Custom script:   RemoveLocation(udg_loc)


Im confused Please help
do i have to make the script?
#6
the custom scripts are internal to either wc3 or JASS (i think) so no, you shouldn't have to make them yourself. all that you need to do is spell AND capitalize correctly, as many programming languages are case-sensitive.
#7
Custom Script is the 3rd action from the top, under Comment, and 2 under Do Nothing

(it is in no category)
#8

ok

Ok beleive it or not that was my thought. I go a name error so I got confused. I will try what you said. Thanks