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

[Trigger] Hero Auto-Select

Status
Not open for further replies.
Level 6
Joined
Jan 9, 2011
Messages
57
Hey guys, I was wondering how to automatically re-select your hero say after accidentally selecting an enemy unit without interfering with any other actions, preferably using GUI Triggers. Thanks in advance!
 
Level 3
Joined
Dec 31, 2008
Messages
46
Try this~ It is a modified version of what I use in my map

EDIT: /)

EDIT: I love your voice acting, I may ask for you to voice a few things ;3
  • Lock to Hero
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • Selection - Select Hero[1] for Player 1 (Red)
      • Trigger - Run Lock to Hero Loop Fix <gen> (checking conditions)
      • Trigger - Turn off (This trigger)
  • Lock to Hero Loop Fix
    • Events
    • Conditions
    • Actions
      • Wait 0.01 seconds
      • Trigger - Turn on Lock to Hero <gen>
 

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,296
This does not work well in multiplayer as any event that detects player selection change requires synchronization of the results. This in turn adds a delay of round trip time and synchronization buffer to the event actually evaluating from the time a player changes his selection. This overall looks very ugly and does not stop deselection since he can have other units selected for considerable time depending on latency of the session.

Let us not forget the added net traffic.

What about something that involves the event and GetLocalPlayer? I am not sure if anything to make the event local only will not upset the determinism of the session.
 
Status
Not open for further replies.
Top