Click A Unit

xxxtrickyxxx

(o Y o)
Reaction score
64
Hey, been having a bit of trouble thought I might ask here...

My map involves the left clicking of units to interact but the problem is you are controlling a hero while you are clicking on these other units. For the most part, it works fine but when you click on another unit it will select the other unit for a good half second because I am wanting it to go back to selecting my hero as soon as you click on another unit. I have tried almost everything possible to avoid this. There is basically too far of a time gap between when selecting the unit and the deselection/selection of the other unit. I have tried just about every selection action combination.

This is one way I have tried doing this, every time a unit is selected, it clears the selection and then selects the hero again. The problem is I think the event is taking too long since it is a good half second that i can see on my ui i have selected the other unit.

Code:
Clicker Thing
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
        (Triggering unit) Not equal to Hero[1]
    Actions
        Selection - Clear selection
        Selection - Select Hero[1]
        Quest - Display to (All players) the Simple Hint message: shoot

I have tried to also have basically the trigger above plus a periodic running every .01 that will constantly clear selection and then select hero as well. This helped a bit but not well enough. Basically by clearing the selection every .01 its about a 50% chance it will flicker from the selection of the other unit. Its not a half second but it is still an annoying flicker when you have to click units quite often. So it seems the event detecting the selection is too slow and even .01 periodic is too slow.

Thanks
 

Zurtrogx

Active Member
Reaction score
24
Just a thought...
You could remove the unit from game when it is selected, which would most definately remove selection, then simply create a new one it it's place.

However, if that unit is special, just create a dummy unit to revive it after selection.
 

xxxtrickyxxx

(o Y o)
Reaction score
64
thanks for the reply... but damn, i gave what you said a shot but still have the same result. but from trying what you mentioned, its pretty easy to see now that the event "player selects unit" is pretty much half a second delayed. dont know if there is a way around this or not.
 

xxxtrickyxxx

(o Y o)
Reaction score
64
hm, theres got to me something i could do. if not, do you think it would get annoying having the unit ui change for a half second every time you click on a zombie to shoot at? it doesnt effect the control of your hero in terms of movement and spell casting but it is more of an aesthetic nuisance that second it selects the enemy unit.
 

Tichondrius

New Member
Reaction score
11
hm, theres got to me something i could do. if not, do you think it would get annoying having the unit ui change for a half second every time you click on a zombie to shoot at? it doesnt effect the control of your hero in terms of movement and spell casting but it is more of an aesthetic nuisance that second it selects the enemy unit.

I would suggest you use another method to make your hero shoot other units. Perhaps make it when your hero is ordered to "smart" an enemy unit (right clicked). That way you still have the same clicking gameplay but your hero is never deselected. Note that you might have to order your hero to stop if he starts moving towards the corpses (shouldn't happen since it's instant kill) or the unit if the kill isn't instant.
 

UndeadDragon

Super Moderator
Reaction score
447
What about:

Every 0.03 seconds of Game Time - Select Hero[1]
 

xxxtrickyxxx

(o Y o)
Reaction score
64
I would suggest you use another method to make your hero shoot other units. Perhaps make it when your hero is ordered to "smart" an enemy unit (right clicked). That way you still have the same clicking gameplay but your hero is never deselected. Note that you might have to order your hero to stop if he starts moving towards the corpses (shouldn't happen since it's instant kill) or the unit if the kill isn't instant.

while that could work, the problem would be since you are clicking quite a lot, there will be problems of trying to right click the unit to shoot at it and missing the unit which then would make your unit move right toward the unit you tried to click. so basically, while trying to shoot at the unit, if you right clicked right next to it by accident you are basically screwing yourself by running right to it. drag selection is disabled so it involves direct clicking.

UndeadDragon What about:

Every 0.03 seconds of Game Time - Select Hero[1]

^_^ if .01 is too slow, i dont think .03 will help much either, but thanks for the suggestion. now, if i could initialize two .01 loops to start say .005 apart, that would probably fix the .10 gap in which it can flicker.

its not so bad if I just make it reselect the hero when you click on another unit since without the periodic loop its about half a second that it will select the unit you clicked. it doesnt hamper in any way controlling your hero or spell casting, its just i dont know how other people might feel about it in terms of is it going to be annoying.

i can attach a sample map later as its pretty simple, i just dont want my main game mechanic to turn annoying for players.

btw, +rep to all who have replied sofar. thanks
 
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