Need help here. control problem

SaMmM

Member
Reaction score
4
In my map, sometimes a player loses his control over the unit that he is currently controlling and selected.

The player will need to deselect the unit and then select it again to regain control.

May i hear from you all what is the possibilities that are causing this issue for me.

Thank you very much in advance.
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
When exactly does this problem occur? After the use of an ability or something, or is it literally just completely random?

If its the second option it may be a periodic trigger that does something, if its the first look at the ability or trigger that cause sit to happen.
 

SaMmM

Member
Reaction score
4
I think its this trigger that causes it, because it happens after someone types -hp.

count hp
Events
Player - Player 1 (Red) types a chat message containing -hp as An exact match
Player - Player 2 (Blue) types a chat message containing -hp as An exact match
Player - Player 3 (Teal) types a chat message containing -hp as An exact match
Player - Player 4 (Purple) types a chat message containing -hp as An exact match
Player - Player 5 (Yellow) types a chat message containing -hp as An exact match
Player - Player 6 (Orange) types a chat message containing -hp as An exact match
Player - Player 7 (Green) types a chat message containing -hp as An exact match
Player - Player 8 (Pink) types a chat message containing -hp as An exact match
Player - Player 9 (Gray) types a chat message containing -hp as An exact match
Player - Player 10 (Light Blue) types a chat message containing -hp as An exact match
Player - Player 11 (Dark Green) types a chat message containing -hp as An exact match
Player - Player 12 (Brown) types a chat message containing -hp as An exact match
Conditions
Actions
Set Group_StatsCounter = (Units currently selected by (Triggering player))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in Group_StatsCounter) Greater than or equal to 2
Then - Actions
Game - Display to (Player group((Triggering player))) for 4.00 seconds the text: --Please Select only one unit
Custom script: call DestroyGroup (udg_Group_StatsCounter)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in Group_StatsCounter) Equal to 0
Then - Actions
Game - Display to (Player group((Triggering player))) for 4.00 seconds the text: --Please Select a unit and try again
Custom script: call DestroyGroup (udg_Group_StatsCounter)
Else - Actions
Unit Group - Pick every unit in Group_StatsCounter and do (Actions)
Loop - Actions
Set REAL_STATS = (Life of (Picked unit))
Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: (The selected unit current hitpoints is + (String(REAL_STATS)))
Set REAL_STATS = 0.00
Custom script: call DestroyGroup (udg_Group_StatsCounter)
 

Nerfpl

New Member
Reaction score
53
you could really use WC3 tags. as for the trigger i dont see anything wrong. what you mean exactly by "lose control" describe behavior
 

SaMmM

Member
Reaction score
4
Below is an example of one of the cases that happens.
It happens every game whenever the stats checking commands are used.

For example:

Player Brown is a enemy of player Red. \\(I am not sure if it needs to be a enemy to happen)

Player Red is currently selecting Unit A, and Unit A belongs to Player Red.

Player Brown then selects Unit A and then types -hp.

Then sometimes, Player Red may lose control over Unit A.
Unit A still remains selected by Player Red.
However, Player Red cannot issue any movement or spells command to it.
Player Red has to UNCLICK and then RECLICK unit A to be able to control it again.

By the way, how do i use wc3 tags?
 

Nerfpl

New Member
Reaction score
53
for start try
Trigger:
  • Set Group_StatsCounter = (Units currently selected by (Triggering player))
    • Unit Group - Pick every unit in Group_StatsCounter and do (Actions)
      • Loop - Actions
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Picked unit)) Not equal to (!=) (Triggering player)
          • Then - Actions
            • Unit Group - Remove (Picked unit) from TempGroup
            • Selection - Remove (Picked unit) from selection for (Triggering player)
          • Else - Actions

then rest of actions
 

SaMmM

Member
Reaction score
4
Thanks, i think it worked.

Will test a few more times and see if its really solved.
 

danpe

New Member
Reaction score
5
try to delete those from the script:

Code:
Custom script: call DestroyGroup (udg_Group_StatsCounter)

i really thinks it will solve the problam... even if it will be a little leak...
 

HydraRancher

Truth begins in lies
Reaction score
197
btw your custom script would fail, the function (destroy_group) is not next to the udg_Group_StatsCounter

>how do you use wc3 tags?
Trigger:
  • [/wc3 ](dont put any spaces)
 

HydraRancher

Truth begins in lies
Reaction score
197
>
Are you sure it will fail? emjlr3 teaches the same thing in this tutorial. http://www.thehelper.net/forums/show...highlight=leak
Any other ways to solve it? I dont wanna let it leak.

I'm not sure if I am correct but I think theres no space
anyway I am not sure whats causing your error, theres no change owner action in there. Are you sure theres no change owner action in any other trigger?
 

danpe

New Member
Reaction score
5
This small little tiny leak wont mind the game you know...
only if you type -hp 1000 times in a min...
 

HydraRancher

Truth begins in lies
Reaction score
197
This small little tiny leak wont mind the game you know...
only if you type -hp 1000 times in a min...

What do you mean? if you keep that attitude he/she wont be bothered EVER to remove leaks and he/she will have a laggy game. Its good to remove even the tiniest leaks to get in the habbit.
 

SaMmM

Member
Reaction score
4
danpe can you please explain to me why you think that it will solve the problem.

I want my map to be as leakless as possible. Because it sometimes plays up to 2 hours and the towers and other units make it quite laggy already.

Btw theres no change owner action in any other trigger.
 

danpe

New Member
Reaction score
5
it heppend to me too...

when i tried to play with selection kinde of what you did in that trigger and i removed my leaks it cused alot of selection bugs...
so i deleted the leaks removers and it worked well... try it out too..
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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