'Unit within range' is not working

Enzyte

New Member
Reaction score
1
Hello again!

I'm trying to update my map with some events. This should happen;
A player (my friend or me) goes near to the ghost and the ghosts says a message displayed to all players.
Here is my code:
Trigger:
  • Events:
    • Unit - A unit comes within 256.00 of Kel'Thuzad (Ghost) 0220 <gen>
    • Conditions:
    • ((Entering unit) is A Hero) Equal to True
    • Actions:
    • Game - Display to (All players) for 20.00 seconds the text: Kel'Thuzad's spirit...

However when I move within range nothing is happening. I've tryied it without conditions, it worked but sadly it'll trigger from wandering monsters =/
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
Try triggering unit instead of entering unit.
The Event says in the description:
Use 'Event Response - Triggering Unit' to refer to the unit that is entering within range.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
Works for me.

You could post your triggers here, maybe there is some other kind of problem.
 

Enzyte

New Member
Reaction score
1
Works for me.

You could post your triggers here, maybe there is some other kind of problem.


I'm starting to think my character is not count as a 'hero'. Is that possible? Which trigger should I post here?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
The one with the event "unit comes within range".
Here, have a look at this attached test map:
 

Attachments

  • ComesWithinRangeTest.w3m
    16.4 KB · Views: 218

Accname

2D-Graphics enthusiast
Reaction score
1,464
Post the trigger again, copy it as text. Or upload the map if you dont mind.
 

Enzyte

New Member
Reaction score
1
Trigger:
  • Trigger eCathedral
    • Events
      • Unit - A unit comes within 256.00 of Kel'Thuzad (Ghost) 0220 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All players) for 20.00 seconds the text: Kel'Thuzad's spirit...
 

Enzyte

New Member
Reaction score
1
Maybe there is a problem with the character selection;
Trigger:
  • Trigger Select Commander
    • Events
      • Unit - A unit enters Commander Selection <gen>
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Selector
    • Actions
      • Unit - Create 1 Commander for (Owner of (Entering unit)) at (Center of Summon Hero <gen>) facing Default building facing degrees
      • Unit - Remove (Entering unit) from the game
      • Unit - Remove Commander 0062 <gen> from the game
      • Camera - Pan camera for (Owner of (Entering unit)) to (Center of Summon Hero <gen>) over 1.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: A player has chosen...


So basically I have Selectors and when you move into the circle you choose your character. This one is the trigger for select the Commander. Yet there are 3 more circles with 3 different characters.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
Has nothing to do with it.
Are you sure your unit is a hero? (Does it have an experience bar and attributes?)
 

Enzyte

New Member
Reaction score
1
Has nothing to do with it.
Are you sure your unit is a hero? (Does it have an experience bar and attributes?)

Oh... damn. Nope... You can't level up or gain attributes in this map. It's a survival thingie. Soo that's what I thought before. So how can I fix it in the easiest way? I still don't want to add the XP bar. Is it enough if I add +1 allstat to my characters? Or something like that.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
Not at all.
Best way would be to store them in a unit array at the position of their owners ID.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
Look at this example map, I changed the one from before slightly.

Only the footman will trigger the message.
 

Attachments

  • ComesWithinRangeTest.w3x
    16.8 KB · Views: 222

Enzyte

New Member
Reaction score
1
Thank you for all your reply but since I'm really bad at creating and understanding variables, I've created an alternative:
Trigger:
  • Trigger eCathedral
    • Events
      • Unit - A unit comes within 256.00 of Kel'Thuzad (Ghost) 0220 <gen>
    • Conditions
      • ((Owner of (Triggering unit)) Equal to Player 1 (Red)) or ((Owner of (Triggering unit)) Equal to Player 2 (Blue))
    • Actions
      • Game - Display to (All players) for 20.00 seconds the text: Kel'Thuzad's spirit...
      • Trigger - Turn off (This trigger)


Probably it looks retarderd for some people, but it works just fine for me :D
 
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