Basic question (Selected units) - Also Wc3 GUI tags

skyblader

You're living only because it's illegal killing.
Reaction score
159
I know do nothing has no effect, just showing him not to do anything there. Although ive been around WE for awhile.. I dont know JASS at all, until just now, when I started reading Romek's guide, but I know nothing about leaks and how to clear them. I'm better at finding leaks now, but still cant find all the leaks.
 

ablationer

New Member
Reaction score
0
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 ;)
Would it make it choose another unit even if it is a hero that is selected?

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.
Hmmm... thanks, but I need it to be doable for any owner that the hero is, not only the triggering player, like player9 could change player2's hero by having it selected and do the command


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.
Thanks, but I have no idea how to deal with groups and variables and such
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Ha? What about my trigger? Seen it yet? And yeah, if you don't know how to deal with groups and variables, learn to. Theyre very important, especially if u dunno JASS. There'll be ppl guiding u if u nid help.
 

ablationer

New Member
Reaction score
0
Oh, sorry, I didn't notice the second page, I'm trying it right now, but I'm having a hard time finding the "do actions" is it in All or General? I can't find it, and I can't find the hero comparaison either (if unit is a hero)
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
if unit is a hero equal to true, that is boolean. Which do actions do u mean. For the unit group or the if/then/else? The do actions is usually beside the original. Like if/then/else multiple actions is just below if/then/else. Same goes for unit group, theyre together.
 

ablationer

New Member
Reaction score
0
Hmmm, I've been thinking of trying this
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 (If (((Picked unit) is A Hero) Equal to True) then do (Hero - Modify Strength of (Picked unit): Add 2) else do (Do nothing))

Think it would work as well? Because honestly I don't see the problem with the first, I was already selecting heroes when doing it, and it worked, only it didn't apply to the selected unit, only a random other hero, weird because i did mention unit selected by player 9, so it's kind of weird
 

ablationer

New Member
Reaction score
0
Isn't mine the same thing? To be honest it's that I have no idea how to make those multi-steps actions like you do

Also, I just tried and it works, in fact the 1st trigger I made works as well... But only in singleplayer, and even if i add players in singleplayer, in multiplayer it bugs, what's going on?
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
I dont think when player 9 has selected player 8 hero counts as an selection
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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