send message only to owner of entering unit

averes

New Member
Reaction score
17
Code:
Untitled Trigger 001
    Events
        Unit - A unit enters YOUR REGION
    Conditions
    Actions
        Game - Display to (All players matching ((Owner of (Entering unit)) Equal to (==) (Matching player))) the text: your text here

Should work.
 

Coolio

New Member
Reaction score
7
wil this work?
Code:
Game - Display to (All players matching ((Owner of (Entering unit)) Equal to (Matching player))) the text: text

It does not have (==) i don't understand what this means anyways... GUI.. NewGen... it's comfusing
 

Cheesy

some fucker
Reaction score
95
Wow, well I was about to answer that and then I refreshed the page and 4-5 posts were already made :\

Well heres my solution if anyone cares. Should work.

Code:
ENTER REGION TEXT
    Events
        Unit - A unit enters Region 000 <gen>
    Conditions
        (Owner of (Entering unit)) Equal to Player 1 (Red)
    Actions
        Game - Display to (All players matching ((Owner of (Entering unit)) Equal to (Matching player))) the text: hello
 

averes

New Member
Reaction score
17
wil this work?
Code:
Game - Display to (All players matching ((Owner of (Entering unit)) Equal to (Matching player))) the text: text

It does not have (==) i don't understand what this means anyways... GUI.. NewGen... it's comfusing

Yes that works fine. You can just ignore the (==).
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> (Owner of (Entering unit)) Equal to Player 1 (Red)

Well, if only player 1's units may enter that region, you can simply show it to player 1...

Actually, why not simply use
Player group (Owner of (<some unit>))
?

And, that also leaks a player group...


I'd suggest the following:

Create a variable called PlayerGroups, of type "player group", with a check in "array" and size 12.

Event:
- Map init
Conditions:
Actions:
Pick every player in (All players) and do
- Player group - Add (Picked player) to PlayerGroups[Player number of (Picked player)]

When you need to show some text:
Game - Display to PlayerGroups[Player number of (Owner of <some unit>)] the text ...
 

Coolio

New Member
Reaction score
7
cuz this is my trigger
Code:
Ar Gasvla lvl 3
    Events
        Unit - A unit enters Ar Gasvla lvl 3 <gen>
    Conditions
        And - All (Conditions) are true
            Conditions
                (Owner of (Entering unit)) Not equal to Player 12 (Brown)
                (Owner of (Entering unit)) Not equal to Neutral Hostile
                (Owner of (Entering unit)) Not equal to Player 11 (Dark Green)
                (Owner of (Entering unit)) Not equal to Player 10 (Light Blue)
                (Owner of (Entering unit)) Not equal to Neutral Passive
    Actions
        Unit - Move (Entering unit) instantly to (Center of Dabruneba lvl 3 <gen>)
        Game - Display to (All players matching ((Owner of (Entering unit)) Equal to (Matching player))) the text: text
i still need to know how to set level requirment for the entering unit
 

WilliamPa

Active Member
Reaction score
51
Make integer condition, then find there Hero - Hero Level. Just put the level there and vóila
 

cowmenace

New Member
Reaction score
22
Code:
Unit Transport
    Events
        Unit - A unit enters Region 005 <gen>
    Conditions
        (Owner of (Entering unit)) Not equal to Player 10 (Light Blue)
        (Owner of (Entering unit)) Not equal to Player 11 (Dark Green)
        (Owner of (Entering unit)) Not equal to Player 12 (Brown)
        (Owner of (Entering unit)) Not equal to Neutral Hostile
        (Owner of (Entering unit)) Not equal to Neutral Passive
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of (Entering unit)) Greater than or equal to 10
            Then - Actions
                Unit - Move (Entering unit) instantly to (Center of Region 005 <gen>)
                Game - Display to (All players matching ((Matching player) Equal to (Owner of (Entering unit)))) the text: text
            Else - Actions
                Game - Display to (All players matching ((Matching player) Equal to (Owner of (Entering unit)))) the text: You shall not pass

ok so just change the regions, the level requirement, and the text. should work just fine. I added in that second text in the Else conditions just cause idk i was bored so just replace that with Do Nothing if you dont want it =)
 

Coolio

New Member
Reaction score
7
Code:
Ar Gasvla lvl 3
    Events
        Unit - A unit enters Ar Gasvla lvl 3 <gen>
    Conditions
        And - All (Conditions) are true
            Conditions
                (Owner of (Entering unit)) Not equal to Player 12 (Brown)
                (Owner of (Entering unit)) Not equal to Neutral Hostile
                (Owner of (Entering unit)) Not equal to Player 11 (Dark Green)
                (Owner of (Entering unit)) Not equal to Player 10 (Light Blue)
                (Owner of (Entering unit)) Not equal to Neutral Passive
                (Hero level of (Entering unit)) Less than or equal to 3
    Actions
        Unit - Move (Entering unit) instantly to (Center of Dabruneba lvl 3 <gen>)
        Game - Display to (All players matching ((Owner of (Entering unit)) Equal to (Matching player))) the text: Shen unda iyo 3 lvl...
 

cleeezzz

The Undead Ranger.
Reaction score
268
do you need help with it? you just posted a code.


get rid of

And All conditions are true, when you put conditions under the conditions block, its defaulted to And

and remove the leak like Acehart said.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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