[Help] Combining 2 Structures into a new one

Status
Not open for further replies.
Level 1
Joined
Mar 15, 2019
Messages
1
Currently I have this trigger:
a35a8cb3c33ab7b46e1ba4f328e4e05d.png

I am trying to make it combine two of the same towers into a new tower. I click the button and nothing happens.
 
Level 9
Joined
Jul 30, 2018
Messages
445
I'm not entirely sure what your goal is, but here is that above trigger in working form: (I also fixed the leaks)

  • Combine Units
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Combine Units
    • Actions
      • Set TempGroup = (Units owned by (Triggering player) matching (((Unit-type of (Matching unit)) Equal to Barracks) and (((Matching unit) is alive) Equal to True)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup) Greater than or equal to 2
        • Then - Actions
          • Set TempPoint = [Whatever point you want]
          • Unit - Create 1 [Unit you want to create] for (Triggering player) at TempPoint facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Unit - Remove (Triggering unit) from the game
        • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGroup)
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
So just so you know... there are abilities to do this already in the game, you shouldn't need to use triggers. Check out the Mount Hippogryff (and I believe the other is called "pick up archer" or something) and "dismount" abilities the Night Elves have. They allow you to target another unit and then combine with it specifically. I believe there are also a set of abilities to do this (and splitting) from the Firelord's spawn fire elemental spell (they break into smaller versions when they die).
 
Status
Not open for further replies.
Top