I’m making a workshop game and I don’t want my variables to be overwritten by a third person camera I wanted to add. Is there a way for me to paste in a third person camera into my game without overwriting anything?
The camera does not use any variable on start… You can set fixed values.
More info about me and my game mods you can find here.
Feel free to comment my ideas.
You can easily build a 3rd person cam without using any variables by directly putting the vector calculation into the start camera action. But that is way to much work for you, as your actual issue is this:
You can solve this by copying the code of the external 3rd person cam you want to add to the clipboard. Then you will see something like this at the top:
5: variable1
12: variable2
23: variable3
24: variable4
If you are using variable 0 to 22 already, you can edit this part like this:
23: variable3
24: variable4
25: variable1
26: variable2
Now it can be integrated without any problem into your mode.
I made a right-shoulder mounted third person camera that uses one rule+variable.
I set it up so that it doesn’t aim exactly at the crosshairs, but in the direction. It was suited for a melee-heroes only mode I was making. If you’d like crosshair-accurate camera, let me know, I’ll adjust it.
rule(“3P Cam”)
{
event
{
Ongoing - Each Player;
All;
All;
}conditions
{
Has Spawned(Event Player) == True;
}actions
{
Wait(0.020, Ignore Condition);
Event Player.A = World Vector Of(Vector(0, 2, -2.500), Event Player,
Rotation And Translation);
Wait(0.020, Ignore Condition);
Start Camera(Event Player, Event Player.A, Ray Cast Hit Position(Event Player.A, Ray Cast Hit Position(Event Player.A,
Eye Position(Event Player) + Facing Direction Of(Event Player) * 50, Null, Event Player, True), Null, Event Player, False),
36);
Chase Player Variable At Rate(Event Player, A, World Vector Of(Vector(-1.100, 2.200, -2.300), Event Player,
Rotation And Translation), 200, Destination and Rate);
Wait(0.250, Ignore Condition);
}
}