Jump to content

Fadecamera not working :(


Miika

Recommended Posts

Hi! My fade camera not working. What is the problem?

[server]

function setFadeCamera() 
    fadeCamera(player, true, 1000) 
    setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) 
end 
addCommandHandler("test", setFadeCamera) 

Link to comment
It does work, but you'll have to wait 1000 seconds before the fading is finished, that's almost 17 minutes, and it would probably take at least 100 seconds before you actually can see a little bit of what's hiding behind the darkness.

I change command. And debugscript says:

Warning: teams/teams.lua:2: Bad argument @ 'fadeCamera' [Expected element at argument 1, got nill] 
Warning: teams/teams.lua:2: Bad argument @ 'setCameraMatrix' [Expected element at argument 1, got nill] 

function setCameraOnPlayerJoin() 
    fadeCamera(source, true) 
    setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) 
end 
addCommandHandler("fade", setCameraOnPlayerJoin) 

Link to comment
function setCameraOnPlayerJoin(thePlayer) 
    fadeCamera(thePlayer, true, 1) 
    setCameraMatrix(thePlayer, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) 
end 
addCommandHandler("fade", setCameraOnPlayerJoin) 

That will solve the problem.

Link to comment
function setCameraOnPlayerJoin(thePlayer) 
    fadeCamera(thePlayer, true, 1) 
    setCameraMatrix(thePlayer, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) 
end 
addCommandHandler("fade", setCameraOnPlayerJoin) 

That will solve the problem.

Thx

Link to comment

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...