Hello, HE community I am having an issue for the FPS Camera I have followed the entire Tutorial and every time I put this command in the console "call fps_camera_callback startfps_camera." I receive a script error and the camera does change its viewport. This is the script error: SCRIPT ERROR: Function [STARTFPS_CAMERA.] not found in script [FPS_Camera_Callback]. I am not sure what to do and I figured someone else would know if I did something wrong here. I made a new script with this code:
function PushAndActivateFPS_CameraLayer()
PushCmdLayer("FPS_Camera")
ActivateCmdLayer("FPS_Camera", true)
.
function DeactivateFPS_CameraLayer()
ActivateCmdLayer("FPS_Camera",false)
ActivateCamera( "GAME" )
.
function SetupFPS_Camera()
camera as NodeRef = AddCamera("FPS_Camera")
character as NodeRef = GetPlayerCharacterNode()
character_position as Vector3
GetNodePosition( character, character_position )
SetCameraPosition( "FPS_Camera", character_position )
character["Render"] = false
SetCameraFollow( "FPS_Camera",character )
SetCameraOffset( "FPS_Camera", 0.0 )
FreeLook( "FPS_Camera", true )
ActivateCamera( "FPS_Camera")
.
function onmouseleaveviewport()
println("Left viewport in fps_camera")
.
function OnMouseClick(lmb as Boolean, rmb as Boolean, mmb as Boolean, mb4 as Boolean, mb5 as Boolean) as Boolean
println("Click")
return false
.
function onMouseMove(mx as Integer, my as Integer, dx copies Integer, dy copies Integer) as Boolean
println("Moving the mouse")
if (GetTweakableBoolean("GameInvertMouseX")) or $INPUT._InputGameInvertMouseX
dx = dx * -1
.
if (not GetTweakableBoolean("GameInvertMouseY")) and ( not $INPUT._InputGameInvertMouseY )
dy = dy * -1
.
fx as Float = dx
fy as Float = dy * -1
if $INPUT._InputGameMouseSensitivity > 0
fx = fx * $INPUT._InputGameMouseSensitivity
fy = fy * $INPUT._InputGameMouseSensitivity
.
camera as NodeRef = GetActiveCamera()
RotateNode(camera,fy,fx,0)
return true
.
function StartFPS_Camera()
PushAndActivateFPS_CameraLayer()
SetupFPS_Camera()
.
Again I have no idea what I did wrong in the script for the console to give me this error and not change my viewport.