Page 1 of 2

Here is a usable Flak88 with one problem...any ideas?

Posted: Mon Sep 29, 2003 2:23 pm
by IvanTheTerrible
Here is a usable Flak88 with one problem...well maybe two. The main problem is that the fire delay is ignored. The other small problem is that the crosshair is located in the line of sight where the player is attached to the gun so it's not in line with the barrel. Anyone got any ideas? The name of the TIKI file is flak88turret.tik

Code: Select all

TIKI
setup
{
	scale 0.42			// Set default scale to 16/30.5 since world 
						// is in 16 units per foot and model is in cm's
	//scale 1.55				// Seems to work better than 0.52
	path models/statweapons/88mmflak
	skelmodel 88turret.skd
	surface all shader flak88
}

init
{
   	server
      {
		classname 		TurretGun
		weapontype		cannon
		name			"88mm A.T. Gun"

		// turret settings
		idleCheckOffset	"-240 0 0"
		viewOffset	" -100 -10 115"
				
		// Primary fire type info
		firetype		projectile
		ammotype		"heavy"
		projectile		models/projectiles/tigercannonshell.tik
		meansofdeath		rocket
		//bulletcount		1
		clipsize		1
		startammo		1
		ammorequired		1
		ammorequired		0
		usenoammo		1
		firedelay		1000
		bulletrange		4000
		bulletdamage		200
		bulletspread		40 40
		tracerfrequency 	3
		turnspeed		38
		pitchcaps		"-30 30 0"

		// AI animation group info
		weapongroup		88mmflak

		// DM Attributes
		dmprojectile	models/projectiles/tigercannonshell.tik
		//dmammorequired	1
		//dmstartammo		10
		dmfiredelay		1000
		dmbulletcount	1
		dmbulletrange	8000
		dmbulletdamage	400
		dmbulletspread	15 15 75 75
		
	}
	client
	{
		cache muzsprite.spr
		cache models/fx/muzflash.tik
		cache models/ammo/rifleshell.tik
	}
}


animations
{
	exit		88turret.skc
	idle_open	88turret.skc
	idle		88turret.skc
	fire		88turret_fire.skc
	{
		server
		{
			entry shoot
		}
		client
		{
			entry stopaliaschannel tank_snd_fire
			entry sound tank_snd_fire weapon 1.0 -1 0.95 0.1

			// muzzle flash
			first tagdlight tag_barrel 0.25 0.2 0.05 110 0.11
			first tagspawn tag_barrel
			(
				scale 0.6
				offsetalongaxis 0 0 0
				count 1
				model muzsprite.spr
				angles 0 0 crandom 25
				life 0.06
			)

			entry tagspawn tag_barrel
			(
				count 1
				scalemin 1.0
				scalemax 1.5
				model models/fx/muzflash.tik
				randomroll
				life 0.04
			)

			// shell eject
			/*entry commanddelay 0.1 tagspawn tag_eject
			(
				spawnrange 1024
				count 1
				model models/ammo/panzer_shell.tik
				scale 1.0
				velocity 70
				randvel crandom 10 crandom 10 random 20
				emitterangles 0 0 0
				avelocity crandom 90 crandom 90 0
				accel 0 0 -800
				physicsrate 20
				life 2.0
				fadedelay 1.7
				collision
				bouncefactor 0.2
				bouncesoundonce snd_rifle_shell
			*/)

			// smoke puff
			entry tagspawn tag_barrel
			(
				spawnrate 1.00
				model vsssource.spr
				alpha 0.30
				color 1.00 1.00 1.00
				scale 0.10
				life 1.00
				scalerate 10.00
				velocity 65.00
				randvel range 20 -60 crandom -40 range 20 -60
				friction 7.00
				fade
				randomroll
			)
		}
	}
}	
     

/*QUAKED turretweapon_german_88mmflakturret (0.5 .25 0.25) (-32 -32 0) (32 32 128)
Big gun - Boom boom.
*/

Posted: Mon Sep 29, 2003 8:33 pm
by jv_map
One thing you could try is to change firetype to 'heavy'.

No luck JV

Posted: Mon Sep 29, 2003 10:54 pm
by IvanTheTerrible
No luck JV...any more ideas LOL? :cry:

Flacky Flak

Posted: Tue Sep 30, 2003 12:53 am
by CorporalPunishment
I have tried lots of ways to limit the fire speed but without success. My latest effort has the ammo spawned a few feet away so you have to keep getting shells.

As for the cross hair well it is always only going to be a guide, but you can change your view, this does work.


viewOffset "-160 0 160"

Spawning shells?

Posted: Tue Sep 30, 2003 3:53 am
by IvanTheTerrible
Tell me more about the shell spawning Corporal. Do you spawn like five shells and then somehow spawn five more after a certain time limit? I assume the spawned shells are removed after the player picks them up?

double

Posted: Tue Sep 30, 2003 4:21 am
by tltrude
You have two lines for this:

ammorequired 1
ammorequired 0

Maybe changing "offsetalongaxis 0 0 0" will do something for the crosshairs.

Shells

Posted: Wed Oct 01, 2003 2:53 am
by CorporalPunishment
I have just a regular item pickup of an 88 Shell (5)

I put two down on the ground near the flak, so by the time
you fire the shots and go back there is always another 5 shells.

Please clarify Corporal

Posted: Wed Oct 01, 2003 4:20 am
by IvanTheTerrible
Sorry Corporal...I'm slow LOL. Please clarify what you mean by regular item pickup. I probably have never utilized the script commands you are talking about.

Posted: Wed Oct 01, 2003 3:05 pm
by Virus
Well.. bazooka ammo works too. So couldnt you make a trigger around the flak, and use this.. this is totally in the script of course. It would be eaiser to do it inside radiant. Or perhaps you want it on stock maps, I dunno.

Code: Select all

local.ammo = spawn trigger_use //Could use trigger_multiple
local.ammo origin ( -497.80 -786.89 136.19 ) //Coords To Flak
local.ammo setsize  (0 0 0) (128 128 128) // trigger size.
local.ammo setthread ammogive

ammogive:
local.player = parm.other
wait 5.0
local.player item "models\weapons\bazooka.tik"
end

Little pick me up

Posted: Wed Oct 01, 2003 11:10 pm
by CorporalPunishment
Yep, heavy ammo is the go, soz I thought that was understood,
in radiant just use the"Item_88shell.tik" it looks nicer than the
rockets.

In game, touch it to receive 5 units (can't carry any more)
and it respawns after a few seconds. So I used two.

No Radient

Posted: Thu Oct 02, 2003 2:34 am
by IvanTheTerrible
I need to accomplish this entirely through script Corporal...I'm spawning it in a standard map.

What I'd like to do

Posted: Thu Oct 02, 2003 6:14 am
by IvanTheTerrible
Ideally I'd like a pile of shells spawned on the ground next to the flak. The player would be able to pick up those shells to use to fire the Flak. He would have to unattach from the flak to pick up more shells.

Posted: Fri Oct 03, 2003 5:02 am
by CorporalPunishment
Yeah script is cool, search the forum I'm sure you'll find the code to spawn and item from script.

Trouble with having auto ammo is the flak is rapid fire, so if your getting ammo
automatically it's fully automatic...........booo

I put a brush in the guts of the flak and put a shell on there, so when using the flak you would get ammo. I didn't like that much, a good eye on the flak with that much ammo is unstopable.

Spawning is not the question

Posted: Fri Oct 03, 2003 9:33 pm
by IvanTheTerrible
I already know how to spawn an item--the entire flak88 is being spawned. I just thought you said there was a specific command for giving ammo to a player. You mentioned something about an item pickup command earlier in this thread.

Posted: Sat Oct 04, 2003 7:35 am
by jv_map
To give ammo to a player, type:

<player ent> ammo heavy 1

This will give <player ent> 1 heavy round 8-)

You may also specify negative values in order to take ammo away from a player.