Basic question (Selected units) - Also Wc3 GUI tags

ablationer

New Member
Reaction score
0
Hello, two quick questions here, Firstly, I want to make this basic trigger

triggertest1.png


But it does not work, it changes the stat of any other unit that is selected, not the one the player 9 has selected, how do i fix it?

Also, how does the wc3 GUI triggers tags work exactly? I took a screenshot but i seen the tags thing
 

Scary Nachos

Castro flashing Gang Signs!
Reaction score
45
Trigger:
  • ______


Just hit the @ thingy and go to your trigger and right click on it, and "Copy as Text" and paste it inbetween the ___'s

Edit Its
Trigger:
  • _____<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_2">
    • <li class="lasttree"><span class="default">Just hit the button thingy</span></li>
    • </ul>
    • </div></div>
 

ablationer

New Member
Reaction score
0
Trigger:
  • testgivestr
    • Events
      • Player - Player 9 (Gray) types a chat message containing str+ as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units currently selected by Player 9 (Gray)) and do (Hero - Modify Strength of (Picked unit): Add 2)

Oh, I see, cool, so any idea how to make this work?
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
I don't understand your problem... Could you explain better?
 

ablationer

New Member
Reaction score
0
Well, it seems simple enough, i just want that, whenever i have a hero selected and i type something, it increases its stat, thats it
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Oh. Just add this condition where it picks them:
(Matching Unit) is owned by (Player 9)
 

ablationer

New Member
Reaction score
0
But I need it to be for any player, like any hero that the player 9 selects, either it's his or not
 

Ticer

New Member
Reaction score
2
In the action part, replace gray player with triggering player. For the events, you might just have to make an event for each human player, i.e. player red types... player blue types... ect. There might be an easier way to do that part that I don't know about.
 

ablationer

New Member
Reaction score
0
There is no triggering player, but anyway I only need to make it available for player 9, only when he types, and only the unit he has selected, no matter who's controlling it
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
If/Then/Else Put under the condition whether selected unit is a hero, then do wadeva u did after.

Wait my bad, no such trigger.


First u pick all units selected by gray, thn in the loop, u create an if/then/else, thn the if u put a boolean comparison, checking whether picked unit is a hero, then whatever actions u wan. Else do nothing.
 

Faust

You can change this now in User CP.
Reaction score
123
There is no triggering player, but anyway I only need to make it available for player 9, only when he types, and only the unit he has selected, no matter who's controlling it


Then who do you think types the chat string?
 

ablationer

New Member
Reaction score
0
If/Then/Else Put under the condition whether selected unit is a hero, then do wadeva u did after.

Wait my bad, no such trigger.


First u pick all units selected by gray, thn in the loop, u create an if/then/else, thn the if u put a boolean comparison, checking whether picked unit is a hero, then whatever actions u wan. Else do nothing.
And what would this look like in a trigger form?


Then who do you think types the chat string?
But there is no triggering player choice in the action for the unit group
 

crazyfanatic

New Member
Reaction score
20
make it to pick units matching condition selected by player 9 AND matching unit is a hero, or the Hero-class trigger actions wont work ;)
 

Admit

New Member
Reaction score
25
Trigger:
  • Stat
    • Events
      • Player - Player 9 (Gray) types a chat message containing -str+ as A substring
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by (Triggering player) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) is selected by (Triggering player)) Equal to True))) and do (Hero - Modify Strength of (Picked unit): Add 2)


Tested it and it works.
 

Baltazhar

Active Member
Reaction score
55
Trigger:
  • Stat
    • Events
      • Player - Player 9 (Gray) types a chat message containing -str+ as A substring
    • Conditions
    • Actions
      • Set Temp_Group = (Units selected by (Triggering player)
      • Unit Group - Pick every unit in (Temp_Group) and do multiple actions:
        • If ((Picked unit) is A Hero Equal to True)
          • Then
            • Hero - Modify Strength of (Picked unit): Add 2
          • Else
      • Custom Script (call DestroyGroup udg_TempGroup)

Hand drawn, so there might be spelling errors and such, but I think it's pretty accurate.
Whenever player 9 types a message, it checks all the units he has selected. If it's a Hero, it gets +2 Str.
Only player 9 can type the message, but he can give the bonus to all other players' heroes.

That sounds like what you had in mind.

EDIT:
Oh just another note, I removed the leaks as well by using Temp_Group and removing it in the end. You will need a Unit Group variable named Temp_Group for this to work.
Not sure how much you are into those things.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Balthazar's one is the right one, the others work too, but they dun fit ur description. Admit's trigger is only for player 9's unit. So is crazy fanatic's. I dun tink i have to psot my trigger right? Balthazar's one is betta.
 

Admit

New Member
Reaction score
25
My trigger does works for every player (just add them to the event), however i forgot that group leaks, other then that mine and Baltazhar triggers are basicly the same.

Edit* ah i saw what you ment now..
 

Baltazhar

Active Member
Reaction score
55
Sky if you have one that's actually made in the editor and not free-hand like mine, I think that could be useful.
I've obviously tried my best, but I have no clue if I got the right terms or not, so imo, post away :)

Easier to follow a trigger if you don't have to start wondering what things should have been :p

EDIT:
Admit what we're after is a trigger that will allow Player 9 (and ONLY player 9), to select units of his/her choice, and then give them additional str. Your trigger allows each player (if you add the players in the event), to give their own units more Str.
Think of it has Player 9 being God, with endless possibilities to modify the rest of the players' units.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Ok since Balthazar said so....
Trigger:
  • Untitled Trigger 001
    • Events
      • Player - Player 9 (Gray) types a chat message containing str+ as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units currently selected by Player 9 (Gray)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A Hero) Equal to True
            • Then - Actions
              • Hero - Modify Strength of (Picked unit): Add 2
            • Else - Actions
              • Do nothing

Untested though. It should work.
 

Baltazhar

Active Member
Reaction score
55
Just FYI skyblade, using the "Do Nothing" action is absolutely useless in the editor. If you remove it and leave it empty, it has the same effect and doesn't require those few bits of mapsize.
Doesn't matter in smaller maps, but having around 500 triggers, it can save up space :)

And you trigger has leaks, should use a unit group and remove it at the end.
Other than that, it looks great. Couldn't see why it shouldn't work :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      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