Trigger to combine 3 towers into 1?

CixxyZ

Active Member
Reaction score
7
I'm trying to make something so that when you select 3 towers a combine button shows up; it disappears if you deselect them. On a new trigger, when you click combine, it checks if you have selected the right towers to combine with, if you have it'll combine them into a new tower.

I'm stuck so +rep to anyone who can solve this! Thanks.
 

XxShadyxX

I abused the rep system.
Reaction score
81
Make a variable called Selected_Towers
Unit type array
Make a variable called Combo
Bool Array

Next make a trigger for each of your combinations

Trigger:
  • Combination
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Selected_Towers[1]
      • (Unit-type of (Triggering unit)) Equal to Selected_Towers[2]
      • (Unit-type of (Triggering unit)) Equal to Selected_Towers[3]
    • Actions
      • Unit - Add Combine to (Triggering unit)
      • Set Combo(1) equal to true


Next make a trigger to check if the ability is clicked.
And if Combo(1) is true then remove the three towers and add the new tower in its place
 

Lightstalker

New Member
Reaction score
55
Make a variable called Selected_Towers
Unit type array
Make a variable called Combo
Bool Array

Next make a trigger for each of your combinations

Trigger:
  • Combination
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Selected_Towers[1]
      • (Unit-type of (Triggering unit)) Equal to Selected_Towers[2]
      • (Unit-type of (Triggering unit)) Equal to Selected_Towers[3]
    • Actions
      • Unit - Add Combine to (Triggering unit)
      • Set Combo(1) equal to true


Next make a trigger to check if the ability is clicked.
And if Combo(1) is true then remove the three towers and add the new tower in its place

There is no triggering unit in the trigger above, just a triggering player. Also, the arrays will have to be set somewhere, in which case you could just use the actual unit without putting it in an array.
 

CixxyZ

Active Member
Reaction score
7
Wish that would have worked but it didn't, like lightstalker pointed out. I need a way to combine like in poker td , gem td.
 

Bloodcount

Starcraft II Moderator
Reaction score
297
use if/then/else to put the right combo

for example
if selected towers are fire fire and water then give combo "steam"

Hope it helps.
 

CixxyZ

Active Member
Reaction score
7
tried it doesn't work. or am i doing something wrong?

see attached
 

Attachments

  • Untitled-1.png
    Untitled-1.png
    14.9 KB · Views: 300

RangerX

I am justice!
Reaction score
69
k i will try to help let's see ..
Trigger:
  • tower
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
      • (Unit-type of (Triggering unit)) Equal to Footman
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units currently selected by Player 1 (Red))) Equal to 3
        • Then - Actions
          • Floating Text - Create floating text that reads sssssssssss above Footman 0087 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Show (Last created floating text) for (All players)
        • Else - Actions



but this will work only if all the towers are the same and i just add the text to see if it works
[edit] the conditions are pointless just use one
 

CixxyZ

Active Member
Reaction score
7
yeah it doesn't exactly solve the problem does it? It's kinda hard since the GUI functions don't really have the appropriate conditions... Maybe possible with vJASS?

Still stuck..
 

RangerX

I am justice!
Reaction score
69
i have an spell combination map ... were you need to have an element buff and only some of the heros can wear them .. and when you have 2 units ... one fire and one air ... if the fire unit cast an spell then the air will cast an spell ... same here [when an spell is used .. then it will search in range for posible combination ... ] if you whant i can make an quik map with the trigger and all is need to combine 2 towers maybe you can put something to chose what comb to make ... just answer me if you whant ...
 

RangerX

I am justice!
Reaction score
69
ok i think this is an solution ..

ok i think this is an solution .. see the map
 

CixxyZ

Active Member
Reaction score
7
Solved! Thanks anyway guys..

2ztc2v6.png


Credit to Pointy@useast he's a genius ... thought of this solution in >5 min.

:D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top