• 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 a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Alternate Training

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2008
Messages
502
There is a condition which checks whether a unit is loaded into a transport. So maybe give that building an ability and tell the loaded units to exit and give them a chas ability which changes them into the upgrade. Depends how you want to work it.
 
Level 19
Joined
Jul 19, 2006
Messages
2,307
Call to Arms with modified unit-type?

No...

I mean there being like a footman unit icon on your barracks, and to train one you merely have to select a peasant within a limited range, or a peasant can be sent to that building to automatically be trained for a cost of gold. I want this to be universal so it can be used with any building and any unit outcome, as well as any cost.
 
  • Melee Initialization
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to Footman
    • Actions
      • Set Unit0 = (Selling unit)
      • Set Point = (Position of Unit0)
      • Set Group = (Units within 600.00 of Point matching ((Unit-type of (Matching unit)) Equal to Peasant))
      • Unit Group - Pick every unit in (Random 1 units from Group) and do (Actions)
        • Loop - Actions
          • Set Unit = (Picked unit)
          • Unit - Turn collision for Unit Off
          • Unit - Order Unit to Move To Point
      • Trigger - Turn on Change Unit <gen>
      • Custom script: call RemoveLocation (udg_Point)
      • Custom script: call DestroyGroup (udg_Group)
  • Change Unit
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set Point = (Position of Unit)
      • Set Point2 = (Position of Unit0)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Point and Point2) Less than or equal to 25.00
        • Then - Actions
          • Unit - Replace Unit with a Footman using The old unit's relative life and mana
        • Else - Actions
      • Custom script: call RemoveLocation (udg_Point)
      • Custom script: call RemoveLocation (udg_Point2)
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
1. Create unit-target spell (Chain Lightning, Channel, Storm Bolt etc...) with footman icon
2. Implement this trigger:
  • Train
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to <Your Ability>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) Current gold) Greater than or equal to <Gold Cost>
        • Then - Actions
          • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) - <Gold Cost>)
          • Unit - Replace (Target unit of ability being cast) with a Footman using The new unit's max life and mana
        • Else - Actions
 
Status
Not open for further replies.
Top