Jump to content

need help with camera function


jkub

Recommended Posts

Posted

I made a script to spectate random players, but is supposed to make the camera have a green tint to it but i cant get that to work right. and i am using the fade camera function anyway here it is...

function watch1 ( source, commandName ) 
    local x, y, z = getElementPosition( source ) 
    local randomPlayer = getRandomPlayer ( ) 
    setCameraTarget ( source, randomPlayer ) 
    fadeCamera ( source, false, 60, 30,  100, 0 ) 
end 
  
addCommandHandler ( "watch", watch1 ) 

but if i fade the camera in it will keep going until it is opaqe green but if i do it false it will just do nothing at all?

Posted
This function will fade a player's camera to a color or back to normal over a specified time period

I don't think that fadecamera does anything other than fade to opaque and back to normal... if you wanted a green tint i would suggest tiling a 1*1 semi transparent .png over the whole screen using guiCreateStaticImage... I can't think of another way of doing it.

Posted

You can't fade half way, no. You can fade half way then fade back again, which has been used to give the camera a red tint from damage...

Posted

k then i c. but also wat if i wanted to set the camera to watch an object instead of a player>>>>. ive already tryed doing that several differentways and had no luck getting the camera to watch an object. I assumed that the target of setCameraTarget dosent have to be a player, but maybe could be a object or vehicle instead, since it is an alement, ive tryed setting it towards botch vehicles and objects and i can only get it to work with players?

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