Disconnection occurs when this trigger is triggered...

Vicboy

Ultra Cool Member
Reaction score
44
Trigger:
  • Select
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
    • Conditions
      • ((Triggering unit) is in selected[(Player number of (Triggering player))]) Equal to False
      • (Owner of (Triggering unit)) Equal to (Triggering player)
    • Actions
      • Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
      • Selection - Clear selection for (Triggering player)
      • Set LastSelectedUnit[(Player number of (Triggering player))] = (Triggering unit)
      • Unit Group - Add (Triggering unit) to selected[(Player number of (Triggering player))]
      • Selection - Select selected[(Player number of (Triggering player))] for (Triggering player)
      • Game - Display to (Player group((Triggering player))) for 1000000000.00 seconds the text: ((String((Number of units in selected[(Player number of (Triggering player))]))) + bases are currently following your command.)


Thanks to a good friend, I was able to find out that this trigger has something that causes me to disconnect.

It's only when I trigger the event that I am disconnected a few seconds after.

Please help me!
 

Conal

Member
Reaction score
12
You are causing the trigger to loop infinite number of times.

If selecting a unit triggers it and you select a unit within the trigger...
 

Vicboy

Ultra Cool Member
Reaction score
44
You are causing the trigger to loop infinite number of times.

If selecting a unit triggers it and you select a unit within the trigger...

I'm sure that's not the problem for 3 reasons.

1. I added a text that appears every time the trigger is triggered. It triggers once only.

2. If it was an infinite loop, it should be giving me a fatal error instead of a silent disconnection.

3. I have this

Trigger:
  • ((Triggering unit) is in selected[(Player number of (Triggering player))]) Equal to False


There's a variable called selected[array]. If you select a unit, it is added in that unit group.

If the unit is already inside the unit group, this trigger will not do an infinite loop.

So infinite loop is not the reason.
 

Seprest

New Member
Reaction score
15
It doesn't matter if the unit is in the unit group, the trigger will fire at least twice because you select the unit again if the unit isn't in the players selected[player#] group, but the events will not happen :D.

Trigger:
  • Selection - Select selected[(Player number of (Triggering player))] for (Triggering player)


You arn't selecting a unit here, but a unit group. Correct? Idk what will happen if you select like 50 units at once. This may crash you, as you just made the game fire this trigger even more o_O
 

Vicboy

Ultra Cool Member
Reaction score
44
I found out the reason!

Trigger:
  • Selection - Select selected[(Player number of (Triggering player))] for (Triggering player)


causes it to disconnect. Dunno why.
 

Seprest

New Member
Reaction score
15
I'm guessing you want to be able to select a bunch of troops to command at once?

If that is what you're looking for, I suggest you make a "move units" ability that can be cast by some unit. You could replace the above line, and instead select all units in the unit group and do actions. Make all units in the unit group attack-to-move to the point that you cast the "move" ability on.

will post stuffz so I can be more specific

Trigger:
  • Melee Initialization
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Move Units
    • Actions
      • Unit Group - Pick every unit in (selected[(Player number of (Triggering player))]) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Move To (Target point of ability being cast)


I believe this is the only way to command many units to do something, works with buildings too of course. Hopefully this is a good patch for your trigger.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top