Little help with SCRIPTED zooming? (having some problems)
Posted: Sat May 09, 2009 9:33 am
I'm trying to make scripted zooming, but I'm having some problems. The script works fine (that means that the console shows no errors :D ), but it doesn't zoom (of course...it's made by me)
Here's the code:
So the script should check if key 12 (Backspace) is pressed and then SetCameraWindow(0.5); and then checks if key 12 is NOT pressed and sets the FOV back (the SetCameraWindow(2); is executed all the time when the key 12 is not pressed, right? How can I make it not to be executed every frame?).
Also I wanna ask about what command should I use best for zoom overlay, I can use HUD picture, Flipbook, but I want to know the best command for this.
Here's the code:
Code: Select all
{
Spawn[ ()
{
Console(true);
LowLevel("zoom");
} ]
zoom[ ()
{
self.ThinkTime = 0.0;
if (IsKeyDown(12))
{
SetCameraWindow(0.5);
}|
if (IsKeyDown(12) = false)
{
SetCameraWindow(2);
HighLevel("Spawn");
}
} ]
}
Also I wanna ask about what command should I use best for zoom overlay, I can use HUD picture, Flipbook, but I want to know the best command for this.