Knowing what Unit...

zaqer50

TH.net Regular
Reaction score
3
This is probably some stupidly easy question but...

Code:
Talk
    Events
        Player - Player 1 (Red) skips a cinematic sequence
    Conditions
        (Is (Last created unit) near Villager (Male 2) 0001 <gen> and withing a range of 500.00) Equal to True
    Actions
        Unit - Pause (Last created unit)
        Cinematic - Clear the screen of text messages for (All players)
        Special Effect - Create a special effect attached to the overhead of Villager (Male 2) 0001 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
        Unit - Make Villager (Male 2) 0001 <gen> face (Last created unit) over 0.50 seconds
        Game - Display to (All players) for 2.00 seconds the text: Hello Stranger.
        Wait 2.00 seconds
        Special Effect - Destroy (Last created special effect)
        Unit - Unpause (Last created unit)

That is my trigger, what I need to know is in the Event part, how can i make it any player, instead of just red. and then down in the Conditions part instead of "Last created unit" it has to be a unit owned by the player hitting ESC.

I hope that makes sense...

Thanks in advance
 

Rad

...
Reaction score
228
(Is (Last created unit) near Villager (Male 2) 0001 <gen> and withing a range of 500.00) Equal to True

Ive seen this before, but again does this function really exist? "Withing"?

Just copy paste the event and change value on different ones for different players so they have one each. Any events fired will run the action. What are you expecting (Last created unit) to be? Any unit owned by the triggering player? This will be extremely difficult and is setup very, very wrong.

What exactly do you need the trigger to do?

EDIT~
Cinematic - Clear the screen of text messages for (All players)
This will not clear player messages, only in single player which has no relative meaning anyways. It will also not clear the text log.
 

zaqer50

TH.net Regular
Reaction score
3
Basicly, when you have a unit within 500 of the Villager and you hit ESC it displays a text to you.

I think "withing" is a typo, its supposed to be "within"
 

Rad

...
Reaction score
228
Is it a WEU function? If so, wow whoever made WEU has bad grammar. By the way there is a boolean 'unit in region' in which the 'region' can be a point with size.

As for the trigger...

Code:
Event: <Player> skips a cinematic sequence
Action: Unit Group - Pick every unit in (Units in <Region>) and do Actions~
     ~ If/Then/Else
          IF (Owner of (Picked unit)) equal to (Triggering player)
          THEN <Display text message to (Triggering player)>
              Skip remaining actions
          ELSE Do nothing
 

Korolen

New User (Why do I keep getting those red bars?)
Reaction score
69
What Rad said has a memory leak: The pick every unit action doesn't destroy the group. Try setting bj_wantDestroyGroup = true, to remove this leak. (Sorry, things things just pop out at me, and I HAVE to point it out ^^)
 

Korolen

New User (Why do I keep getting those red bars?)
Reaction score
69
Sorry about the double-post, but this is a different subject and time then my first post.

Instead of a "Unit in range" condition, I think it would be better to use a boolean function that says "If you can see the Unit". You can also use both, so you can't talk from behind a wall of trees, but you still have to be near.
 
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