Is the event EVENT_PLAYER_UNIT_SELECTED delayed?

GoGo-Boy

You can change this now in User CP
Reaction score
40
Hi there,
as it seems there's a slight (about 0.5seconds) delay between me clicking a unit and the action of that trigger firing.

Is there anything to do about it? I guess not though...
 

the Immortal

I know, I know...
Reaction score
51
Use a timer to check when selection is changed. The performance loss would be negligible but you should use it with care as it requires a LocalPlayer block and thus you will be able to use only 'compatible' functions (no handle creation / destruction and such). You can, ofc, sync selections but I believe this isn't instant which would be the same as using the built-in event.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Yeah, there is a slight delay. Even with a timer, there is a slight delay, but I believe it is less, especially when it comes to multiplayer vs. single player.

You can try messing around with :
JASS:
constant native IsUnitSelected      takes unit whichUnit, player whichPlayer returns boolean
native GroupEnumUnitsSelected               takes group whichGroup, player whichPlayer, boolexpr filter returns nothing


But there is no real way to completely "remove" the delay.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top