Page 1 of 2
Bind question
Posted: Thu Sep 23, 2004 1:50 am
by strafer
I have a tank binded to a parachute and whenever I have the parachute move down from the sky, the tank spins around in circles like crazy. The parachute and tank move to where I want though. Anyone know how I can fix this?
Script_model
Posted: Thu Sep 23, 2004 2:24 am
by tltrude
Is the tank a script_model (classname)?
Posted: Thu Sep 23, 2004 2:27 am
by strafer
No.
tank
Posted: Thu Sep 23, 2004 2:32 am
by tltrude
Try changing its classname to "script_model". You can always hide/remove it when it gets to the ground and spawn the real tank at that spot.
Posted: Thu Sep 23, 2004 8:44 am
by bdbodger
Spawning things will do that too especially tanks . Try not to use the tanks in the static directory there are some in the vehicles directory that you can use and I think the couple in the animate directory are made for that .
Posted: Thu Sep 23, 2004 9:10 pm
by strafer
bdbodger wrote:Spawning things will do that too especially tanks . Try not to use the tanks in the static directory there are some in the vehicles directory that you can use and I think the couple in the animate directory are made for that .
I'm using the tigertank.tik file from the vehicles folder and there isn't one that I could find in the animate folder. I could only find a kingtiger tank and an opel truck.
Posted: Fri Sep 24, 2004 1:38 am
by strafer
I tested out cobra's mg42 script for the tank and it works fine, but the binding problem happens to it too. When the tank is driving, the mg42 spins in it's spawning point.
Posted: Sat Sep 25, 2004 11:25 am
by Grassy
Would making the turret point to a designated spot in the map stop it spinning?
Posted: Sun Sep 26, 2004 1:31 am
by Grassy
G'day there, I was thinking some more about your problem so looked into the files within the sdk.
setAimTarget: this sets an entity for the turret to aim at. It will physically point at its aim target. This will get over ridden when the turret has a user (AI or player)
clearAimTarget: This clears the aim target set by the use of the setAimTarget command.
These commands can be used from script or editor.
Grassy
Posted: Thu Sep 30, 2004 12:13 am
by Cobra {sfx}
Yeh the MG42 was for a static tank not a moving tank Strafer, the best i got on a moving one was attaching it to its turret altho it didnt like me trying to adjust its position to where i wanted it using an offset so it was spawning inside the turret (not where i wanted it) so i didnt use it
Ps what they mean is use a static tank for the parachute drop and upon it landing remove it and respawn one in its place that you intend to have driving around and thread to its driving script
eg - heres how i done the allied GMC truck in Omaha Assault...
(this happens halfway thru a c47s flight and is hidden until release from it)
local.gmc1 unglue local.g_spot1
wait 1
local.ori = spawn script_origin
local.ori.origin = local.gmc1.origin + ( -40 0 50 )
local.ori bind local.gmc1
local.chute = spawn script_model
local.chute model "static/parachute.tik"
local.chute scale 2.5
local.chute.origin = local.ori.origin
local.chute glue local.ori
local.gmc1 show
local.gmc1 solid
local.gmc1 speed 150
local.gmc1 movedown 2300
local.gmc1 waitmove
spawn models/vehicles/gmctruck.tik "targetname" "truck2"
$truck2.origin = local.gmc1.origin
$truck2.angle = 3
$truck2 nodamage
$truck2 solid
local.chute unglue local.ori
local.gmc1 remove
local.chute movedown 130
local.chute waitmove
local.chute remove
//now have your nodes etc here and its drive commands
Voila!!

Posted: Thu Sep 30, 2004 2:34 am
by strafer
Awsome cobra, thanks.
Do you know why my if statement isn't working? I posted it above. It is supposed to do something if a player hits the use key.
Posted: Thu Sep 30, 2004 11:09 am
by Cobra {sfx}
Be more helpful if you posted the script
Posted: Thu Sep 30, 2004 7:53 pm
by strafer
lol oops. I was thinking I posted it in this one, but I put it in another one.
Code: Select all
// SNOWY PARK
// ARCHITECTURE: NED
// SCRIPTING: NED
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Snowy Park"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "mohdm5"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waitTill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/mohdm5.scr
exec global/ambient.scr mohdm5
level waittill spawn
thread allied
spawn script_model "targetname" "rad1"
$rad1 model models/animate/alarmswitch.tik
$rad1.origin = ( 4692 -4015 172 )
$rad1.angle = 90
$rad1 triggerable
$rad1 solid
snow:
wait 1
level.rain_speed = "32"
level.rain_speed_vary = "16"
level.rain_length = "2"
level.rain_width = "1"
level.rain_density = ".2"
level.rain_slant = "250"
level.rain_min_dist = "1800"
//level.rain_min_dist = "512"
level.rain_numshaders = 12
level.rain_shader = "textures/snow0"
end
allied:
$rad1 waittill trigger
if (local.player.dmteam != allies)
{
if (local.player.useheld == 1)
{
local.player = parm.other
local.rad1 anim move
local.rad1 playsound lighthouse_lever
iprintln "it works!"
}
}
else
{
iprintln "You are not on the Allies Side!"
}
end
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based games here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
end
Posted: Thu Sep 30, 2004 10:08 pm
by Cobra {sfx}
Should it not be..
$rad1 anim move
$rad1 playsound lighthouse_lever
iprintln "it works!"
the capital T works?
(level waitTill prespawn)
Posted: Fri Oct 01, 2004 1:51 am
by strafer
Cobra {sfx} wrote:Should it not be..
$rad1 anim move
$rad1 playsound lighthouse_lever
iprintln "it works!"
the capital T works?
(level waitTill prespawn)
I've tried $rad1 anim move. It also didn't work.
I guess the T works...I never noticed it being capitalized...