• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Unsolved] Unit Combination Region Trigger Help

Status
Not open for further replies.
Level 1
Joined
Jun 5, 2015
Messages
3
Hello,

I am trying to create a trigger that will combine two units into one.

For instance, if player 1 puts a Siege Tank and Marauder onto the point, they are removed and player 1 gets a Thor.

Currently I have a trigger that combines two Siege Tanks into a single Thor. The problem is creating a trigger that can combine units that aren't the same type. Any advice is welcome. My tank combine trigger posted below.

tank combine
Events
Unit - Any Unit Enters Region 001
Local Variables
Conditions
And
Conditions
(Count of units in Region 001 having alliance Ally with player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) > 1
(Unit type of (Triggering unit)) == Siege Tank (Tank Mode)
Actions
Unit - Create 1 Thor for player (Triggering player) at marine binding spawn using default facing (No Options)
Unit Group - Pick each unit in ((Unit type of (Triggering unit)) units in (Triggering region) owned by player (Triggering player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Remove (Picked unit) from the game

Edit #1: This particular trigger works. I can put two tanks into the region and they will be removed for me to get a Thor. However, I do not know how to make this trigger work with units of different types.
 
Level 4
Joined
May 2, 2013
Messages
107
You can make 2 global Variable Unit Types. 1 for Marauder and 1 for Siege tank. Put both variables in your conditions. Marauder = 1 and Siege Tank = 1


See attachment for picture of what I mean. I would have tried it like this. Haven't test it though. Maybe there might be more efficient ways, but I think this should work.
 

Attachments

  • Combine Units.png
    Combine Units.png
    17.1 KB · Views: 104
Level 1
Joined
Jun 5, 2015
Messages
3
Thank you for the response! This looks like it would work really well. The only issue I am seeing is that it would not remove the original marauder or tank. Is there an easy and convenient way to add an action for those specifically? I am going to experiment in the mean time but I'm wondering if there is a simple way.

Thanks!


The issue I'm having is that despite requiring two units to cause the trigger, there is only one "triggering unit." Therefore, the action "remove triggering unit" only removes one as opposed to both.
 
Level 4
Joined
May 2, 2013
Messages
107
You can just remove all those units within that region? Or you can choose to remove all Marauders + Siege tanks in that region. Also, if the counts are both equal to 1. You shouldn't worry about other units ^^

It's hard to tell. It really depends on your concept. How big is that region? How much is that region going to be used? By what units? Does it have multiple purposes? Etc etc..
 
Level 1
Joined
Jun 5, 2015
Messages
3
In this particular situation, I think the ideal action would be to remove 1 tank and marauder belonging to the triggering player. Unfortunately I haven't been able to find an action that says "remove [# of unit type] from [region] belonging to [triggering player]." Am I not looking hard enough? I'm sorry for the naivety but I only started learning this editor a few days ago!
 
Level 4
Joined
May 2, 2013
Messages
107
I don't think its easy like that. You need to work around it and try to solve every part with diffrent triggers. Somehow link every unit to something so you can pick it later. Perhaps make all kinds of playergroups and put unit in them once they entered the region. Just try few things, trigger module isn't that hard, you just need to try alot. And don't worry about that naivety, I am a noob editor too. ^^

Maybe other people have more convieneient solutions. Good Luck!
 
Status
Not open for further replies.
Top