Jump to content

Camera switch with only 2 cameras?


hulpje

Recommended Posts

Posted

im not scripter but in races I'd like to be able to switch instantly between bumper camera and middle (3th person).

I couldn't find any commands to do it in-game so maybe someone knows commands for it?

Otherwise maybe possible with script?

I tried a bit myself but every line I write instantly destroys a working script so I gave up.

so I wish to be able to toggle between those 2 modes:

setCameraViewMode(0)

setCameraViewMode(2)

bindKey("v","down","togglecamera")

I though this are the client thingies I need but I dont know...

and then togglecamera refer to the function or something?

Posted
bindKey ( "v", "down", 
    function ( ) 
        setCameraViewMode ( ( getCameraViewMode ( ) == 0 ) and 2 or 0 ) 
    end 
) 

Is that what you wanted?

Posted
bindKey("v", "down", 
function() 
    local cMode = getCameraViewMode() 
    cMode = cMode + 1 
    if cMode == 2 then cMode = 0 end -- or cMode == 6 (all modes) 
        setCameraViewMode( cMode ) 
    end 
end 
) 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...