Post your scripting questions / solutions here
Moderator: Moderators
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 4:14 am
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.
HappyChappy_7000
Warrant Officer
Posts: 146 Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:
Post
by HappyChappy_7000 » Sat Jul 12, 2003 4:26 am
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?
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 4:34 am
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.
HappyChappy_7000
Warrant Officer
Posts: 146 Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:
Post
by HappyChappy_7000 » Sat Jul 12, 2003 4:41 am
I DID IT!!!!!!
The tank works and you can se from the outside of the tank
What? You know who I am?
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 4:41 am
okay, so which set from my previous post worked?
HappyChappy_7000
Warrant Officer
Posts: 146 Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:
Post
by HappyChappy_7000 » Sat Jul 12, 2003 4:45 am
$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?
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 4:49 am
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!
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 4:50 am
i might think about making a global script that helps you easily enter a vehicle with a desired view..
HappyChappy_7000
Warrant Officer
Posts: 146 Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:
Post
by HappyChappy_7000 » Sat Jul 12, 2003 4:52 am
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?
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 4:57 am
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.
HappyChappy_7000
Warrant Officer
Posts: 146 Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:
Post
by HappyChappy_7000 » Sat Jul 12, 2003 5:02 am
you need the follow part so that the camera follows the tank
What? You know who I am?
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 5:03 am
what if it catches up to the tank? will it stop when it hits the tank or keep following it?
HappyChappy_7000
Warrant Officer
Posts: 146 Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:
Post
by HappyChappy_7000 » Sat Jul 12, 2003 5:06 am
it stops when the tank stops and follows when the tank drives away
What? You know who I am?
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 5:08 am
cool but i dont think it would look up when the tank aims upward.
HappyChappy_7000
Warrant Officer
Posts: 146 Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:
Post
by HappyChappy_7000 » Sat Jul 12, 2003 5:12 am
your right it doesn't
What? You know who I am?