[Trigger] Pan Camera Problem

SwedishChef

New Member
Reaction score
32
Okey I gotta go in a second so I will race through my explanation. I just want a trigger where the camera pans to a location and then gives a hint about an unit. But it works in one trigger but not in the other.

The one which don't work:

Trigger:
  • Teleport From Ready 2
    • Events
      • Unit - A unit enters Ready <gen>
    • Conditions
      • Move_ok Equal to False
    • Actions
      • Set MyUnitGroup = (Units in Ready <gen>)
      • Set MyLocation = (Center of Item Area <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units in Ready <gen>)) Equal to (Number of players in All_Players)
        • Then - Actions
          • Set Move_ok = True
          • Countdown Timer - Pause ChooseHero
          • Countdown Timer - Destroy (Last created timer window)
          • Trigger - Turn off Timer Expires <gen>
          • Unit Group - Pick every unit in MyUnitGroup and do (Actions)
            • Loop - Actions
              • Set Has_Moved[(Player number of (Owner of (Picked unit)))] = True
              • Multiboard - Set the text for (Last created multiboard) item in column 1, row Multiboard_Spots[(Player number of (Owner of (Picked unit)))] to (Player_Colors[(Player number of (Owner of (Picked unit)))] + ((Name of (Owner of (Picked unit))) + |r))
              • Hero - Modify unspent skill points of (Picked unit): Set to 1 points
              • Player - Set (Owner of (Picked unit)) Current gold to 350
              • Unit - Move (Picked unit) instantly to MyLocation
              • Camera - Pan camera for (Owner of (Picked unit)) to MyLocation over 0.00 seconds
              • Special Effect - Create a special effect at MyLocation using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Create 1 Stash (dummy) for (Owner of (Picked unit)) at MyLocation facing Default building facing degrees
              • Unit - Remove HeroChooseDummy[(Player number of (Owner of (Picked unit)))] from the game
              • Custom script: call RemoveLocation(udg_MyLocation)
              • Set MyLocation = (Position of Stash[(Player number of (Owner of (Picked unit)))])
              • Camera - Pan camera for (Owner of (Picked unit)) to MyLocation over 1.00 seconds
              • Custom script: call RemoveLocation(udg_MyLocation)
          • Quest - Display to (All players) the Quest Update message: This is your stash....
          • For each (Integer A) from 1 to 11, do (Floating Text - Destroy Text[(Integer A)])
          • Trigger - Run New Round <gen> (checking conditions)
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Custom script: call DestroyGroup(udg_MyUnitGroup)
      • Game - Display to (All players) the text: 2


The one which works:
Trigger:
  • Teleport From Ready
    • Events
      • Unit - A unit enters Ready <gen>
    • Conditions
      • Move_ok Equal to True
      • Has_Moved[(Player number of (Owner of (Triggering unit)))] Equal to False
    • Actions
      • Set MyLocation = (Center of Item Area <gen>)
      • Set Has_Moved[(Player number of (Owner of (Entering unit)))] = True
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row Multiboard_Spots[(Player number of (Owner of (Entering unit)))] to (Player_Colors[(Player number of (Owner of (Entering unit)))] + ((Name of (Owner of (Entering unit))) + |r))
      • Player - Set (Owner of (Entering unit)) Current gold to 350
      • Hero - Modify unspent skill points of Hero[(Player number of (Owner of (Entering unit)))]: Set to 1 points
      • Unit - Move (Entering unit) instantly to MyLocation
      • Unit - Create 1 Stash (dummy) for (Owner of (Triggering unit)) at MyLocation facing Default building facing degrees
      • Camera - Pan camera for (Owner of (Entering unit)) to MyLocation over 0.00 seconds
      • Special Effect - Create a special effect at MyLocation using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Remove HeroChooseDummy[(Player number of (Owner of (Triggering unit)))] from the game
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Set MyLocation = (Position of Stash[(Player number of (Owner of (Triggering unit)))])
      • Camera - Pan camera for (Owner of (Triggering unit)) to MyLocation over 1.00 seconds
      • Quest - Display to (Player group((Owner of (Triggering unit)))) the Quest Update message: This is your stash....
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Custom script: call DestroyGroup(udg_MyUnitGroup)
      • Game - Display to (All players) the text: 1


So what is the problem?
 

Lifee

New Member
Reaction score
46
replace owner of picked unit with this
Trigger:
  • Camera - Pan camera for (Owner of (Entering unit)) to (Center of (Playable map area)) over 0.00 seconds
or
Trigger:
  • Camera - Pan camera for (Owner of (Triggering unit)) to (Center of (Playable map area)) over 0.00 seconds
i think it should work with one of these if it didnt work with owner of picked unit
 

SwedishChef

New Member
Reaction score
32
I want to pan the camera to the "Stash" unit. But this only works in the second trigger not in the first. Why?
 

SwedishChef

New Member
Reaction score
32
Yes the Game Messaged (1 and 2) are being displayed and all other actions work just fine.

E: Also the Quest Message is displayed as it should. Only Pan Camera which dosn't work.
 

X.Terror.X

New Member
Reaction score
10
in trigger 2 u got a panning camera to a point over 1 second
its used picked unit but there was never a unit been picked..
so that one isnt working but that was not your problem


add a small wait timer?
somethime it might be able the unit triggers the region but isnt triggered within the region yet


this is the main problem i think
Code:
(Number of units in (Units in Ready <gen>)) Equal to (Number of players in All_Players)


u exspect all players got 1 unit
but u creating units (dummies) witch you dont see but are there!
get a unit group with all player (main) units that should be in that region


Edit*

i think you ask him to pan a camera to a picked unit and this picked unit u just removed some lines before
 
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