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

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