The Tanks Secondary Fire Mode
Moderator: Moderators
-
Cobra {sfx}
- Site Admin
- Posts: 194
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
The Tanks Secondary Fire Mode
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.
(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.
-
Cobra {sfx}
- Site Admin
- Posts: 194
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
-
Cobra {sfx}
- Site Admin
- Posts: 194
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
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 .
-
Cobra {sfx}
- Site Admin
- Posts: 194
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
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.

Improvisation

// 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.
Improvisation

- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
-
Cobra {sfx}
- Site Admin
- Posts: 194
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
-
Cobra {sfx}
- Site Admin
- Posts: 194
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
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
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

