i need a macro that checks if a cam is active or not. if firstperson is not active use thirtperson if thirtperson is not active use first person…
im now by the macro creation windo but i cant find the camera…what is the camera as input? or can smd shortly build this macro ? ty
i tryed select object but it cant be combined and a select component doeset is there as function yet. i try a select component macro maby…
Maybe you can adjust your requirements slightly, because both cameras are always active ( in this case ). It would be better to have a variable that you flip when you switch characters. A central place for that would be the game instance.
Then, you can write a macro, but… I just tried that, and you get in a mess because you can’t have a local camera component variable. You can keep a reference to the current camera in the game instance though, so you might as well do the whole thing there ( including swapping players ):
Then, getting the camera is just:
and
I didn’t do the player swap, because I don’t know how you’re doing that…
im now at this point but idk how to do the is active param
btw i can use ,is active" as param but the -get world rotation- gets an error when connected to
-new param3- it says target must have a connection lel
Does it work?, like I say, I think they’re both active if you have both players in the world.
it not work. its the fire mechanic that chooses the rotation of the active camera. when i switch from frist to third person i need it to fire with the Y rotation. the -get world rotation- seems not to find the imput of the scene components as it says errror all the time…
Ah! - this is all 3rd person then? You have 2 cameras in the third person character?
i have a first and a third person cam for single player mod. and when i switch the cameras the fire mechanic needs to switch the cam input to get the rotation to fire with
If you’re doing it all in the third person character, much easier with a function:
ye i can do that with a branche but im basicaly in the first person that switches to third person and back. to do it with a true falshe exe means that i need to double the whole fire mechanism.
to reduce the code i thought i could find a way to pick up the active camera at the ,get world rotation".
but if there is no trick for that i might need to branch it
Wherever the function is, you can use it like this:
i not see get active camera Oo. the project was startet as first person but it still not shows me active camera …anyhow i solved it with a branch. needed to dublicade the tree to catch the rotation of both cams. i let this topic open for macros and scripts
ingame it works perfectly
GetActiveCamera is the function I just showed you how to make… no branch…