Player owns hero ?

S

Suicide_Note

Guest
is there a way to make a trigger that would have this effect

Event- A player types -on as an exact match

Condition- player owns (hero)

action - disable (trigger)



i want it to be any player... not just Player1(red) or just Player2(blue) without having to make individual events

I plan on also having the hero bought from a tavern, not being in the map in the begining of the game... so i cant select a variable, and i dont know the first thing about creating my own variable.

----------------------------

I would at least like to know how to bunch all the players into one event.


.
 

Scam_ent

New Member
Reaction score
1
I'm a little confused about what it is you're doing, but it seems like you could just use an OR condition, with multiple conditions... That'd save you from having to do multiple triggers...
Wait, better idea.
Just use a player comparison condition, so you end up with "Owner of (hero) equal to Triggering Player"
I think that's basically what you wanted, isn't it?

[EDIT:] sorry, my bad, your problem was in the events area. You COULD do an event for each player, in the same trigger. OR you could do player:Owner of Unit:(Hero)... but that would mean making the Hero a variable once you had got him into the tavern, but that's fairly easy.

- ][ocus
 
M

matrix_sk8er

Guest
I feel your pain, its annoying having to create a new event/ condition/ trigger for each player, but sometimes you have to.

I'm pretty sure this is one of those case's. I think this is the eziest way to do what you want:

Code:
Events:
     Player- Player 1 (Red) types a chat message containing -on as an exact match
     Player- Player 2 (Blue) types a chat message containing -on as an exact match
     Player- Player 3 (Teal) types a chat message containing -on as an exact match
     Etc...

Conditions:
     (Number of units in (Units owned by (Triggering Player) of type (your hero))) equal to 1

Actions:
     Trigger- Turn off (trigger)

Repeating the same event etc. is really not that bad, especially in this instance. just copy and past the event then change the player for it.
 

Scam_ent

New Member
Reaction score
1
You win.

- ][ocus
 
S

Suicide_Note

Guest
OR you could do player:Owner of Unit:(Hero)... but that would mean making the Hero a variable once you had got him into the tavern, but that's fairly easy.

how is that? knowing this would make everything so much more simplistic
 

Scam_ent

New Member
Reaction score
1
How do you do what? Make the hero a variable? Or use Player owns hero?

- ][ocus
 
C

Cyclical

Guest
While I'm not sure exactly what you're trying to do, I AM sure how to make a variable based on a hero. This is actually something I just figured out myself, and it really allows you to tighten up your design a lot.

Do this: (Since I'm not sure what exactly you're going for, I'll just approximate)

EVENTS
-Player types (Pandaren Brewmaster) as an exact match - or whatever other hero you want; I just love these guys :)
CONDITIONS
-Number of living (Pandaren Brewmaster) controlled by Triggering Player equal to 0
ACTIONS
-Create 1 (Pandaren Brewmaster) at (Spawn Location) for (triggering player
-Set (The name of the variable I'll tell you how to make) equal to (Last created unit)

That wil mean that from that point on, you can control that unit by its variable, even if it's not placed on the map.

Now the trick is that you will have to make a different variable for each hero if you want to be able to trigger them individually. How to do that:

-Open the Variable editor, select Create New Variable
-Name it something applicable (Like "Player1Pandas" or some such)
-From the "Variable Type" dropdown select "Unit"
-Use it in the previous trigger

Now the only annoying part is that you may have to set a LOT of variables; if you want to be able to control Heroes individually by player, each Hero for each Player will need its own variable.

That having been said, however, let me just say that making variables takes about 2 seconds (just copy/paste and change names).

Incidentally, while you're at it, take a look at the other types of variables while you're doing this. You'll find that you can assign a variable to just about anything. Really, I think they're the most important (and poorest-explained) aspect of why WC3's WE is so powerful.

Hope this proves to be somewhat helpful.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top