Disable camera moving when select idle worker

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
Hello everyone!
it has been a while since I last posted :)

here is my problem: when I select an idle worker, using F8, ` or click idle worker button, the camera would move to the position of the worker.

I actually make item shop a worker so it can be selected quickly, but this camera moving thing is not... convenient at all so I wonder is there anyways to disable that?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
You could save the currently selected units into a variable, and re-select them when a worker is selected.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Here is a trigger using Kaerfs method.
Trigger:
  • Selection
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A peon-type unit) Equal to True
        • Then - Actions
          • Selection - Clear selection for (Triggering player)
          • Selection - Select ug_selection[(Player number of (Triggering player))] for (Triggering player)
        • Else - Actions
          • Set ug_selection[(Player number of (Triggering player))] = (Units currently selected by (Triggering player))
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Actually, I realised my error soon after that. Tom wants to keep the worker selected but not move the camera. This might work better.
Trigger:
  • Selection
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A peon-type unit) Equal to True
        • Then - Actions
          • Set TempUnitGroup = ug_selection[(Player number of (Triggering player))]
          • Set TempUnit = (Random unit from TempUnitGroup)
          • Set TempPoint = (Position of TempUnit)
          • Camera - Pan camera for Player 1 (Red) to TempPoint over 0.00 seconds
          • Custom script: call DestroyGroup (udg_TempUnitGroup)
          • Custom script: call RemoveLocation (udg_TempPoint)
        • Else - Actions
          • Set ug_selection[(Player number of (Triggering player))] = (Units currently selected by (Triggering player))
 
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