Page 1 of 1

The Tanks Secondary Fire Mode

Posted: Tue Sep 14, 2004 11:43 am
by Cobra {sfx}
Anyone know the commands to get a tank (in this case a Panzer_Tank_Europe) to use its onboard MG42 to fire, i ask this because ive tried all kinds with the Panzer, i edited the TIK to enable it as it was remmed out, the MG42 barrel spawns but is usually above the tank somewhere and doesnt respond to the usual startfire type commands
(eg $panza gun2 startfiring). Im wondering is there perhaps only a certain model that it does work on.

$panza.gun1 = $panza QueryTurretSlotEntity 1

I would have thought that would kick the MG42 into action.

Posted: Tue Sep 14, 2004 1:25 pm
by oddball
don't know how to enable the mg42 on the tanks, but you might try the t34 for that, i know that one comes with the machinegun enabled for players when they get in, so there should be an option to enable it whenever you want.

Posted: Tue Sep 14, 2004 1:40 pm
by Cobra {sfx}
No T34 in Allied Assault m8, and this isnt to drive, its for an Autotank, thanks anyway

Posted: Tue Sep 14, 2004 2:45 pm
by oddball
Oops sorry, so used to spearhead.. i forgot AA doesn't have the t34 :oops:

Posted: Tue Sep 14, 2004 5:32 pm
by lizardkid
couldnt you bind a regular mg42 to the top?

Posted: Tue Sep 14, 2004 9:51 pm
by Cobra {sfx}
I have done as a backup, just thought id ask if anyone else had similar trouble with the onboard mg42

Posted: Wed Sep 15, 2004 2:24 am
by bdbodger
the original tank turret is turretslot 0 I don't know if you can do it like the jeep for a second turret or not . the jeep uses self attachturretslot 0 $player I don't know if the tank had turretslot 1 if you could attachyturretslot 1 and have the gun usable or not . I am pretty sure you can attach the player but I don't know if you can make the gun usable .

Posted: Wed Sep 15, 2004 10:43 am
by Cobra {sfx}
Heres the info from its TIK file, as you can see the MG-Turret is remmed out (for reasons not yet known) i tried unremming them but it spawned the MG above the tank and facing the wrong direction to the one that is already there so ive improvised and let the "driver" use a spawned one thru the drivers view slot lol (note - this isnt a drivable tank, just an auto one that stays where its at and strafs the beach area.


// Spawn and attach the parts
spawnturret 0 "vehicles/panzer_cannon.tik"
//spawnturret 1 "vehicles/panzer_smgun.tik"

A quick look in Lightray reveals that the bone is there for turret1, yet it was originally remmed out - perhaps some problem they couldnt fix.

Image


Improvisation
Image

Posted: Sat Sep 18, 2004 10:34 pm
by HDL_CinC_Dragon
that looks awesome!

Posted: Sun Sep 19, 2004 5:29 am
by Cobra {sfx}
Not what i was after but it`ll do the job, ill have a look at the tanks secondary fire on my days off, see if i can get it working properly.

Posted: Sun Sep 19, 2004 7:31 am
by lizardkid
after you finish post a tut and links to script and .TIK files so other mapper/scripters can do it. i for one would love that in my maps. :D

Posted: Sun Sep 19, 2004 12:52 pm
by Cobra {sfx}
Ok m8 i will, if i cant get the proper onboard MG42 working ill show ya how to do the "added" version and its fire settings :)

Ok heres some code that is only of use to a static tank...

main:
level waittill prespawn
thread panza_aims
thread panza_mg42
level waittill spawn
end

panza_aims:

spawn script_origin "targetname" "aim9"
$aim9.origin = ( -1043 -4225 2105 )

spawn script_origin "targetname" "aim10"
$aim10.origin = ( 1195 -3841 2133 )

spawn script_origin "targetname" "aim11"
$aim11.origin = ( 6937 -4796 2027 )

spawn script_origin "targetname" "aim12"
$aim12.origin = ( 1113 -4375 2064 )

spawn script_origin "targetname" "aim13"
$aim13.origin = ( -896 -2326 2258 )

spawn script_origin "targetname" "aim14"
$aim14.origin = ( 1888 -3827 2090 )

end

panza_mg42:

spawn vehicles/panzer_tank_europe1.tik "targetname" "panza77"
$panza77.origin = ( 3347 -653 2777 )
$panza77.angle = -120
$panza77.gun = $tiger77 QueryTurretSlotEntity 0
$panza77.gun dmprojectile models/projectiles/panzerIVshell.tik
$panza77 nodamage

spawn "statweapons/mg42_gun.tik" "targetname" "t1"
$t1.origin = ( 3298 -782 2835 )
$t1.angles = ( 0 -120 0 )
$t1 notsolid
$t1 burstFireSettings 0.55 1.5 1 .25
$t1 bulletdamage 25

while (1)
{
wait 5
$t1 setaimtarget $aim9
$t1 startfiring
wait 3
$t1 stopfiring
$t1 setaimtarget $aim10
$t1 startfiring
wait 3
$t1 stopfiring
$t1 setaimtarget $aim11 //etc etc
$t1 startfiring
wait 3
$t1 stopfiring
wait 20
}
end

Note - these are set up for our Omaha Assault map so youll need to edit the Tanks,MG42s and Aim coords for your map, youll also need some aim points added for the panzers cannon if you intend it to fire.

Now to look at a moving Tank

edit..

Well not much luck with a moving tank, the onboard just doesnt want to know :(