• 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.

Need help with a trigger

Status
Not open for further replies.
Level 8
Joined
Jul 17, 2004
Messages
283
How do I do the following?

A unit is selected twice, then display a message.

So you select the unit once (this does nothing), then if you select the unit again, something is done. Essentially double-clicking.

???
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
^ and the upper of ^ . If you don't understand their speech , Here is a very simple GUI example , it's for player 1 only, :) , So add more triggers for more players
  • Selecting
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • Set TempInteger = (TempInteger + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInteger Equal to 2
        • Then - Actions
          • Set TempInteger = 0
          • -------- YOUR ACTIONS !!!!!! O_o --------
        • Else - Actions
  • Deselecting
    • Events
      • Player - Player 1 (Red) Deselects a unit
    • Conditions
    • Actions
      • Set TempInteger = 0
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Double Click
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to UnitSelect
        • Then - Actions
          • Game - Display to (All players) the text: Double-click has co...
        • Else - Actions
          • Set UnitSelect = (Triggering unit)
Yeah, so if you want to make it as close as "Double-click" function, you should use Timer as suggested by Maker and timeout at about 0.25~0.50 second.
 
Level 4
Joined
Oct 28, 2012
Messages
82
I would prefer Maker way, since a double click is 2 click in very short time (0.5s seem not)
 
Status
Not open for further replies.
Top