Selection Event is buggy?

woot

New Member
Reaction score
8
What is up with the selection event?

It seems to sometimes mess up.. if you call GetUnitsSelectedAll (Get units selected by player) it will sometimes get the correct value (the selected unit) and sometimes will come up with more units for seemingly no reason at all

the thing is though, its random.. i click sometimes and it works ok, i click others and random other units are thrown into the group of selected units .. I guess some other code I have could be breaking it .. but I have no idea what to even look for.. this is so bizarre

if anyone has any ideas please let me know =\

thanks
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
Code:
Select
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
    Actions
        Set myGroup = (Units currently selected by Player 1 (Red))

Code:
Deselect
    Events
        Player - Player 1 (Red) Deselects a unit
    Conditions
    Actions
        Custom script:   call DestroyGroup( udg_myGroup )
 

woot

New Member
Reaction score
8
I'm not working with a global group

It's a local group

I create it each time a unit is selected, and destroy it just after I get the count out of it

I recently added some code to tell me which units were selected for debugging and the units can be incredibly random and strange =\


Edit:

More info --

The function to select units in a group seems to desynch my game.. so I had to make my own sort of function that simply puts all the units i want in a group and adds them to the current selection one by one in a loop


I think I fixed it


I built in my own system for keeping track of selected units .. it seems to work better than blizzards.. =\
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Set myGroup = (Units currently selected by Player 1 (Red))

That only works about half the time or so.

Set Group = Units owned by Player 1 matching (((Matching unit) is selected by Player 1) equal to true)
Alternatively, "units in region matching ...".
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top