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: 307

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.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top