• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

right click trigger unit selected

Status
Not open for further replies.
Level 5
Joined
Jan 19, 2020
Messages
102
i want if a player right klick on a unit a trigger will start, but unit selected doesnt realy work, any other ideas?
 
Level 30
Joined
Feb 18, 2014
Messages
3,636
Player Selection should normally work fine, what do you mean by it doesn't really work?
Anyway, you can use issued order instead.
  • Right Click Detection
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(smart))
      • (Target unit of issued order) Equal to (SomeUnit)
    • Actions
      • -------- Do what you want here --------
 
Level 5
Joined
Jan 19, 2020
Messages
102
It doesnt work, because they are 2 scripts, the selected doesnt work.

1)
Events
Unit - Gnome Teleporter (Ausrichtung Südost) 0642 <gen> Is selected
Conditions
(Unit is A Hero) Equal to Wahr
Actions
Dialog - Clear teleporter
Dialog - Change the title of teleporter to Teleporter
Dialog - Create a dialog button for teleporter labelled Gnoll (lvl 1)
Set VariableSet Dialogbutton[1] = (Last created dialog Button)
Dialog - Create a dialog button for teleporter labelled Wildkin and Kudos (...
Set VariableSet Dialogbutton[2] = (Last created dialog Button)
Dialog - Show teleporter for (Owner of (Triggering unit))
Set VariableSet Unitteleport = (Triggering unit)

2)
Events
Dialog - A dialog button is clicked for teleporter
Conditions
(Clicked dialog button) Equal to Dialogbutton[1]
Actions
Unit - Move Unitteleport instantly to (Center of Region 029 <gen>)
 
Level 5
Joined
Jan 19, 2020
Messages
102
i will test it, but got it to work very difficult^^

a unit is a variable? i can pick only no unit as preset

i mean it could be every unit, and i can pick only a unit on a map with that

i mean i just need someting like

a unit select teleporter then teleport, but its to hard
 
Last edited by a moderator:
Level 2
Joined
Feb 14, 2020
Messages
19
Unsure what you are looking for.

However, your trigger fires only when you click on that specific unit. Now, I dont speak.. German?. But this condition "(Unit is A Hero) Equal to Wahr" I believe would check if the unit you selected is a hero, which it most likely isnt? That is probably the reason you feel your trigger never fires. Same with triggering unit, your triggering unit is the unit youre selecting, not the one you probably want to teleport.
 
Status
Not open for further replies.
Top