I can't seem to find why this doesn't work.

Inflicted

Currently inactive
Reaction score
63
Yeah I know thats a bad heading.

Camera is by default locked onto the main unit for each player, but selecting the Radar allows you to have the camera lock removed while the Radar is selected.

It only needs to be MPI.

There are 4 Main Triggers involved:

Trigger:
  • Selects Radar
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Radar
      • (Humans[(Player number of (Triggering player))] is alive) Equal to True
      • HasRadar[(Player number of (Triggering player))] Equal to True
    • Actions
      • Camera - Reset camera for (Triggering player) to standard game-view over 0.00 seconds


Trigger:
  • Deselects Radar
    • Events
      • Player - Player 1 (Red) Deselects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Radar
      • (Humans[(Player number of (Triggering player))] is alive) Equal to True
    • Actions
      • Camera - Lock camera target for (Triggering player) to Humans[(Player number of (Triggering player))], offset by (0.00, 0.00) using Default rotation
      • Selection - Select Humans[(Player number of (Triggering player))] for (Triggering player)


Trigger:
  • build radar
    • Events
      • Unit - A unit Begins construction
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Radar
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Charges remaining in (Item carried by Humans[(Player number of (Owner of (Triggering unit)))] of type Rock)) Equal to 3
        • Then - Actions
          • Item - Remove (Item carried by Humans[(Player number of (Owner of (Triggering unit)))] of type Rock)
        • Else - Actions
          • Item - Set charges remaining in (Item carried by Humans[(Player number of (Owner of (Triggering unit)))] of type Rock) to ((Charges remaining in (Item carried by Humans[(Player number of (Owner of (Triggering unit)))] of type Rock)) - 3)
      • Set HasRadar[(Player number of (Owner of (Triggering unit)))] = True


Trigger:
  • destroyed
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Radar
    • Actions
      • Set Temp_UnitGroup = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Radar) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to (Owner of (Dying unit))))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Temp_UnitGroup) Equal to 0
        • Then - Actions
          • Set HasRadar[(Player number of (Owner of (Triggering unit)))] = False
        • Else - Actions
      • Custom script: call DestroyGroup (udg_Temp_UnitGroup)


Anybody see any obvious mistakes I may have made?
This seems to work with Player 1. But fails for anybody else. :/

[Possible Thoughts:]
Does this work?
(Unit-type of (Triggering unit)) Equal to Radar
?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Use debug messages and find it out. Cannot see anything from these triggers.
 

Inflicted

Currently inactive
Reaction score
63
Tried that, all debug messages worked perfectly.
And well everything worked perfectly for player 1. In Test/Single Player aswel as hosting online.
However in Multiplayer, there was a problem where the camera did not unlock for other players. Still worked for me as player 1.

My thoughts are that possibly this line is causing the problem:
(Unit-type of (Triggering unit)) Equal to Radar

on the event:
Player - Player 1 (Red) Selects a unit

EDIT: WAIT WUT, They all say Player 1.
Total fail, lol sorry.
Problem solved :/
 
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