Flyable Planes

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post 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.
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post 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.
What? You know who I am?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post 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.
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post by HappyChappy_7000 »

I DID IT!!!!!! :) :!:
The tank works and you can se from the outside of the tank
What? You know who I am?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

okay, so which set from my previous post worked?
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post by HappyChappy_7000 »

$cam1.viewpitch = local.gun.viewpitch // the only prob is that the turret crosshair doesn't move up or down
What? You know who I am?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post 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!
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

i might think about making a global script that helps you easily enter a vehicle with a desired view..
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post 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

What? You know who I am?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post 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.
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post by HappyChappy_7000 »

you need the follow part so that the camera follows the tank
What? You know who I am?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

what if it catches up to the tank? will it stop when it hits the tank or keep following it?
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post by HappyChappy_7000 »

it stops when the tank stops and follows when the tank drives away
What? You know who I am?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

cool but i dont think it would look up when the tank aims upward. :cry:
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post by HappyChappy_7000 »

your right it doesn't
What? You know who I am?
Post Reply