Page 2 of 3

Posted: Sat Jul 12, 2003 4:14 am
by Alcoholic
i tried his map and i gotta say MAN when you win its so dramatic!

anyways, i havent tried to use the cam myself, but i think this could work.

Code: Select all

local.gun = $tank queryturretslotentity 0

local.faketag = spawn script_origin "origin" "local.gun.origin"

local.faketag.origin glue local.gun.origin

$cam1 bind local.faketag

cuecamera $cam1

while (level.intank == 1)
{
    waitframe
    $cam1.angles = local.gun.angles
}
you might even need to use "viewangles" but then again i dont know if the rest would even work. just my 30 second theory.

Posted: Sat Jul 12, 2003 4:26 am
by HappyChappy_7000
The script you made works :)
But the script only moves the crosshair with the turret from side to side not up or down.

Posted: Sat Jul 12, 2003 4:34 am
by Alcoholic
just scrolled thru g_allclasses reallly quix, try adding this line in the while loop:

Code: Select all

$cam1.viewpitch = local.gun.viewpitch //....? i have no clue

//if that dont work maybe this can work...
//erase $cam1.angles yata yata yata

$cam1.angles[0] = local.gun.angles[0]
$cam1.angles[1] = local.gun.angles[1]
$cam1.angles[2] = local.gun.angles[2]

good luck.

Posted: Sat Jul 12, 2003 4:41 am
by HappyChappy_7000
I DID IT!!!!!! :) :!:
The tank works and you can se from the outside of the tank

Posted: Sat Jul 12, 2003 4:41 am
by Alcoholic
okay, so which set from my previous post worked?

Posted: Sat Jul 12, 2003 4:45 am
by HappyChappy_7000
$cam1.viewpitch = local.gun.viewpitch // the only prob is that the turret crosshair doesn't move up or down

Posted: Sat Jul 12, 2003 4:49 am
by Alcoholic
bah oh well forget about that.. look what we've done.. we figured out a way to change the view in vehicles... for example, we could just as easy have a third person view!

Posted: Sat Jul 12, 2003 4:50 am
by Alcoholic
i might think about making a global script that helps you easily enter a vehicle with a desired view..

Posted: Sat Jul 12, 2003 4:52 am
by HappyChappy_7000
you could use the script in any vehicle...
heres the code.

Code: Select all

playerview:

local.gun = $tiger queryturretslotentity 0
 
$cam1.viewpitch = local.gun.viewpitch 

$cam1 follow local.gun

cuecamera $cam1 

while (level.intank == 1) 
{ 
    waitframe 
    $cam1.angles = local.gun.angles //Dont know if this 
//is needed
} 

end


Posted: Sat Jul 12, 2003 4:57 am
by Alcoholic
i dont know about the follow comand never had any exp with it...

the view pitch has to be in the while loop, or else it only happens once.
the script waits for your current frame to pass by, then in the next frame, it will change your view, so it looks seamless.

Posted: Sat Jul 12, 2003 5:02 am
by HappyChappy_7000
you need the follow part so that the camera follows the tank

Posted: Sat Jul 12, 2003 5:03 am
by Alcoholic
what if it catches up to the tank? will it stop when it hits the tank or keep following it?

Posted: Sat Jul 12, 2003 5:06 am
by HappyChappy_7000
it stops when the tank stops and follows when the tank drives away

Posted: Sat Jul 12, 2003 5:08 am
by Alcoholic
cool but i dont think it would look up when the tank aims upward. :cry:

Posted: Sat Jul 12, 2003 5:12 am
by HappyChappy_7000
your right it doesn't