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?
 
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 --------
 
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>)
 
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:
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.
Back
Top