• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Create mulitiple units with barracks..

Status
Not open for further replies.
Level 2
Joined
Jul 13, 2006
Messages
9
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.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
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 )
 
Level 2
Joined
Jul 13, 2006
Messages
9
Code:
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?
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
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.
 
Status
Not open for further replies.
Top