• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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 63
Joined
Jan 18, 2005
Messages
27,197
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