Camera trigger help

Status
Not open for further replies.
Level 7
Joined
Jul 11, 2008
Messages
104
Can someone guide me through making this exact trigger? :

Lock camera on a certain region showing a mercanary camp. [Theres also a wisp to allow me to choose from that mercanary camp.]

Once I pick someone from the mercanary camp, the unit appears somewhere else on the map.

Unlock camera, and set camera to the unit I picked.

Kill wisp that allowed me to choose from the mercanary camp.

+rep if you help me.:sad:
 
Level 6
Joined
May 7, 2009
Messages
228
I don't know much about how mercenary camps work, but here's what I'd try

  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Set the camera bounds for (Picked player) to <Put the region around the camp here>
  • Untitled Trigger 002
    • Events
      • Unit - A unit owned by Player 1 (Red) Finishes training a unit
    • Conditions
    • Actions
      • Camera - Pan camera for (Owner of (Triggering unit)) to (Position of (Trained unit)) over 0.00 seconds
      • Unit - Kill (Triggering unit)
 
Level 7
Joined
Jul 11, 2008
Messages
104
The 1st trigger works fine.
But the second one wont work, my camera is still locked and doesn't appear to the picked unit.

Btw, I also want it so that when I pick my unit, it spawns in a region away from the mecanary shop.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789

  • Untitled Trigger 002
  • Events
    • Unit - A unit owned by Player 1 (Red) Finishes training a unit
  • Conditions
  • Actions
    • Camera - Pan camera for (Owner of (Triggering unit)) to (Position of (Trained unit)) over 0.00 seconds
    • Unit - Kill (Triggering unit)
This creates a leak ("Position of Trained Unit") and you didn't reset the camera bounds.



  • Lock Cam
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to [number of Players], do (Actions)
        • Loop - Actions
          • Camera - Lock camera target for (Player((Integer A))) to Hero Tavern <gen>, offset by (0.00, 0.00) using Default rotation
  • Choose Hero
    • Events
      • Unit - A unit enters Rect 000 <gen>
    • Conditions
      • (Unit-type of (Entering unit)) Not Equal to Wisp
    • Actions
      • Unit - Remove Wisp from the game
      • Camera - Reset camera for Owner of (Entering Unit) to standard game-view over 0.00 seconds
      • set TempLoc = Center of [Your Region]
      • Unit - move (Entering Unit) instantly to TempLoc
      • Custom script - call RemoveLocation(udg_TempLoc)
I think this explains itself, but if you have experience problems, I'll try to help.
You can also use the "pick every player in (All Players)", of course...
 
Status
Not open for further replies.
Top