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

[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 39
Joined
Feb 27, 2007
Messages
5,048
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