• 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.

[Trigger] Making a 'fusion' ability

Status
Not open for further replies.
Level 8
Joined
Dec 29, 2006
Messages
359
How would i go about making an ability that will allow one unit to fuse with another? I know that i would need both of the individual units, then the fused unit in the object editor, but i dont know how to go about making the trigger for it, cuz im almost positive it cant be done in the object editor.

In case this helps anyone: I want there to be one unit type that you can train, and it will have the ability: Fuse. This ability will be able to target any unit or building that has not already been fused with, and it will upgrade it, depending on the type of unit/building you use Fuse ability on.

P.S. If anybody can come up with a better name than Fuse, for an insect, almost Zerg-like (the race is not meant to be Zerg-like, its just the best way i could think of to describe them) race, then please, feel free to tell me.
 
  • Fuse
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fuse
    • Actions
      • Set TempUnitA = (Triggering unit)
      • Set TempUnitB = (Target unit of ability being cast)
      • Set TempLocA = (Position of TempUnitB)
      • Set TempPlayer = (Owner of TempUnitA)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • TempUnitA Equal to (Unit (A))
              • TempUnitB Equal to (Unit (A))
        • Then - Actions
          • Set TempReal = ((Life of TempUnitA) + (Life of TempUnitB))
          • Unit - Remove TempUnitA from the game
          • Unit - Remove TempUnitB from the game
          • Unit - Create 1 Unit (AA) for TempPlayer at TempLocA facing Default building facing degrees
          • Unit - Set life of (Last created unit) to TempReal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • TempUnitA Equal to (Unit (A))
              • TempUnitB Equal to (Unit (B))
        • Then - Actions
          • Set TempReal = ((Life of TempUnitA) + (Life of TempUnitB))
          • Unit - Remove TempUnitA from the game
          • Unit - Remove TempUnitB from the game
          • Unit - Create 1 Unit (AB) for TempPlayer at TempLocA facing Default building facing degrees
          • Unit - Set life of (Last created unit) to TempReal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • TempUnitA Equal to (Unit (A))
              • TempUnitB Equal to (Unit (C))
        • Then - Actions
          • Set TempReal = ((Life of TempUnitA) + (Life of TempUnitB))
          • Unit - Remove TempUnitA from the game
          • Unit - Remove TempUnitB from the game
          • Unit - Create 1 Unit (AC) for TempPlayer at TempLocA facing Default building facing degrees
          • Unit - Set life of (Last created unit) to TempReal
        • Else - Actions
      • Set TempReal = 0.00
      • Custom script: set udg_TempUnitA = null
      • Custom script: set udg_TempUnitB = null
      • Custom script: set udg_TempPlayer = null
      • Custom script: call RemoveLocation(udg_TempLocA)
 
Level 8
Joined
Dec 29, 2006
Messages
359
So i decided to name the unit that has the fuse ability a Cridizoa, a modified name conceived from a type of jellyfish.

I do have one more question though, is it possible that i could make it so some units (such as the upper-tier powerful units, or structures) require more than one Cridizoa for their fusion to be successful?
 
Status
Not open for further replies.
Top