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.
(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 )
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?
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.