Making a camera follow a unit and more camera problems

waveseeker

New Member
Reaction score
1
Hi there, I'm trying to make a camera follow a unit, its pretty much a one controllable unit RPG, I just need the camera to follow the unit from normal distance, but for some reason, when i move my unit, the camera doesnt follow, heres what i have


events - A unit enters Entire map

conditions -

actions - Camera - Lock camera target for player 2 [blue] to Mur'gul Reaver 0009 <gen>. Offset by [0.00, 0.00] using the unit's rotation


What am i doing wrong? (i hardly under stand most of it, i dont know what <gen> is) Also,

I have a Start of the map camera cinematic, but only half of it works,

I had a working start, about three camera shifts, and it worked, then i added a few, and it stopped, any ideas?





oh, and How do i delete older threads? (i have loads of questions and i really don't want to spam anyone.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
you cannot delete your threads unless you have a certain amount of reputation i believe, and you dont need to anyways because all threads are saved for future people with similar questions, they can just use the "search" function then.

however, we need some info, is your hero pre-placed on the map? is he bought from a tavern? created via triggers? saved inside some variable?

all this is necessary for us to know which event your trigger should use.
 

waveseeker

New Member
Reaction score
1
the setting is on an island. its pretty small, 60x60 ish, i want cameras to swivel around the map once, then swoop down to the hero. who starts off in game. any help would rock :]
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
well, the "move the camera around" part could rather easily be done with different pre placed cameras and an action to change the camera for the owner of that hero over time from one camera object to another.

if you want to lock the camera to your preplaced hero just do so after your "move cam stuff" has been done.

you already found the action to lock the camera to the hero, you dont need any condition and no trigger since you want it to run when your other trigger finishes, that means you will call the camera lock action at the end of your "move cam" trigger.

to preplace camera objects open the camera layer, the shortkey is usually M.
place them in whatever rotation and facing you want.
now make a trigger which fires at map initialization, no condition needed, and do your camera moving stuff, like this:
Trigger:
  • CameraMovingStuff
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Camera - apply Camera 001 &lt;gen&gt; for SOMEPLAYER over 0.00 seconds
      • Camera - apply Camera 002 &lt;gen&gt; for SOMEPLAYER over 5.00 seconds
      • Wait 5.00 seconds
      • Camera - Lock camera target for SOMEPLAYER to SOMEHERO 0000 &lt;gen&gt;, offset by (0.00, 0.00) using Facing of the Unit

with this:
Trigger:
  • Camera - apply Camera 001 &lt;gen&gt; for SOMEPLAYER over 0.00 seconds

you make the camera of someplayer you have to choose move towards the preplaced camera 001 over 0.00 seconds, that means immediately.
the next action:
Trigger:
  • Camera - apply Camera 002 &lt;gen&gt; for SOMEPLAYER over 5.00 seconds

will make the camera move to the Camera 002 in a smooth motion. this move will take it 5.00 seconds.
thats why we have to wait 5.00 seconds, until the camera move is done.
at the end we lock our camera to our preplaced hero.

additionally you might want to enter cinematic mode at the beginning and exit cinematic mode at the end since only because the camera is moving doesnt mean the player cannot scroll around with his mouse nor play the game. in cinematic mode he cant.
 

waveseeker

New Member
Reaction score
1
The camera only does one weird action, It sort of locks east, and moves as if i went from camera 1 -> 2 not 1->2->3->4 all the way up to 18... is there a limit or something? or does it have to do with locking my camera onto my unit? (i "remove" the unit from the game in the end.)
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
please show us the entire trigger, then we will most probably have it alot easier to help you.
 

Eimtr

Member
Reaction score
1
If you want a 3D camera view that is like WoW and many other games, wherever your unit is facing the camera also points that direction try this one, I was told this system a long ago and works pretty nicely (forgot who from thw): /I made it with events text message, for you event may be Map Initialization and you can omit the Deactivate 3D view trigger if you always want to have 3d view, i did those fixes to suit my tastes)

Trigger:
  • Activate 3D View
    • Events
      • Player - Player 1 (red) types a chat message containing /3d as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CameraOnOff Equal to False (this is boolean variable)
        • Then - Actions
          • Set PlayerSpecific[(Player number of (Triggering player))] = True
          • Set CameraOnOff = True
          • Trigger - Turn on Selection &lt;gen&gt;
        • Else - Actions
          • Set PlayerSpecific[(Player number of (Triggering player))] = False (this is boolean with array 1)
          • Set CameraOnOff = False
          • Set CameraTarget[(Player number of (Triggering player))] = No unit (unit variable array 1)
          • Player Group - Remove (Triggering player) from PlayerCamGroup

Trigger:
  • Deactivate 3D View
    • Events
      • Player - Player 1 (red) types a chat message containing /3doff as An exact match
    • Conditions
    • Actions
      • Trigger - Turn off Selection &lt;gen&gt;
      • Trigger - Turn off Camera Alt &lt;gen&gt;
      • Trigger - Turn off Camera System &lt;gen&gt;
      • Camera - Reset camera smoothing factor


Trigger:
  • Selection /Initially Off. greyed/
    • Events
      • Player - Player 7 (Green) Selects a unit
    • Conditions
      • (Owner of (Triggering unit)) Equal to (Triggering player)
      • PlayerSpecific[(Player number of (Triggering player))] Equal to True
    • Actions
      • Set CameraTarget[(Player number of (Triggering player))] = No unit
      • Set CameraTarget[(Player number of (Triggering player))] = (Triggering unit)
      • Trigger - Turn on Camera Alt &lt;gen&gt;


Trigger:
  • Camera Alt /Initially Off. greyed/
    • Events
      • Time - Every 0.60 seconds of game time
    • Conditions
    • Actions
      • Trigger - Run Camera System &lt;gen&gt; (checking conditions)


Trigger:
  • Camera System /Initially Off. greyed/
    • Events
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PlayerSpecific[(Player number of (Picked player))] Equal to True
            • Then - Actions
              • Player Group - Add (Picked player) to PlayerCamGroup
            • Else - Actions
      • Player Group - Pick every player in PlayerCamGroup and do (Actions)
        • Loop - Actions
          • Set CameraTargetPos[(Player number of (Picked player))] = (Position of CameraTarget[(Player number of (Picked player))]) (this is point variable with array 1)
          • Camera - Pan camera for (Picked player) to CameraTargetPos[(Player number of (Picked player))] over 0.60 seconds
          • Camera - Set (Picked player)&#039;s camera Rotation to (Facing of CameraTarget[(Player number of (Picked player))]) over 1.00 seconds
          • Camera - Set (Picked player)&#039;s camera Angle of attack to 360.00 over 0.35 seconds
          • Camera - Set (Picked player)&#039;s camera Field of view to 70.00 over 0.35 seconds
          • Camera - Set (Picked player)&#039;s camera Distance to target to 600.00 over 0.35 seconds
          • Camera - Set (Picked player)&#039;s camera Height Offset to 250.00 over 0.35 seconds
          • Custom script: set udg_CameraTargetPos[GetConvertedPlayerId(GetEnumPlayer())] = null
      • Player Group - Remove all players from PlayerCamGroup


This system will allow you whatever unit that belongs to you is selected, the camera will turn from the unit's back and whatever direction he faces the camera also points that direction
 

waveseeker

New Member
Reaction score
1
Okay, so it looks like this: (the action is under map initiation, for testing it out.

Trigger:
  • Camera - apply camera 008 &lt;gen&gt; for player 2 [blue] over 0.00 seconds
    • Camera - apply camera 009 &lt;gen&gt; for player 2 [blue] over 5.00 seconds
    • Camera - apply camera 010 &lt;gen&gt; for player 2 [blue] over 5.00 seconds
    • Camera - apply camera 011 &lt;gen&gt; for player 2 [blue] over 5.00 seconds
    • Camera - apply camera 012 &lt;gen&gt; for player 2 [blue] over 5.00 seconds
    • Camera - apply camera 013 &lt;gen&gt; for player 2 [blue] over 5.00 seconds
    • Camera - apply camera 014 &lt;gen&gt; for player 2 [blue] over 5.00 seconds
    • Camera - apply camera 015 &lt;gen&gt; for player 2 [blue] over 5.00 seconds


(from 008 - 025)
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
you need to add waits in between. without the "wait" action it will instantly go through all cameras in one instance.
 
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