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
  • 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