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,463
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,463
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,463
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,463
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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top