PDA

View Full Version : Tank Trouble



RR_Raptor65
09-10-2010, 07:59
I'm having a bit of trouble with one of my tanks, it has a 105mm main gun which works perfectly, but it also has a 30mm coaxial cannon. Specifically, the cannon has no effects when fired. Additionally when the shell impacts the ground there is no explosion effect. I have another tank with a 30mm cannon for a main gun which does have a working fire effect, but the shells still won't create an explosion effect on the ground. I can't get the recoil animation to work either.

The 30mm cannons are quite lethal and fire HE rounds, but the only time there is an impact effect is if they hit a man, tank, building or rock.

You can see a picture of the tank with the coaxial 30mm here:
http://i457.photobucket.com/albums/qq291/RR_Raptor65/Four%20Levels%20of%20Support/th_Mars_Render-1.jpg (http://i457.photobucket.com/albums/qq291/RR_Raptor65/Four%20Levels%20of%20Support/Mars_Render-1.jpg)

I edited the Tank.inc in the hopes that it would work, but I can't see why it doesn't want to work.

{"mars tank"
{on spawn
{add_view "flash_cannon_small" "flashbarrel1" "Foresight11"}
}
{on fire "30mm_mars"
{view start "flashbarrel1"}
{view start "flashbarrel1s"}
{spawn "dust_shot_small" "basis"}
{spawn "tank_canon_fire_small" "Foresight11" x}
{ani_play "fire_30mm"}
{delay 0.8
{view pause "flashbarrel1"}
}
{delay 0.2
{view pause "flashbarrel1s"}
}
}
{on "add_movement_sound" overload
{link_sound "move" "vehicle/tracks/bishop" }
{link_sound "engine" "vehicle/engine/bishop" }
{link_sound "engine_end" "vehicle/engine/bishop_end" }
{link_sound "exhaust" "vehicle/engine/bishop_up" }
{link_sound "rotate_turret" "vehicle/turret/churchill_turret" }
}
("burn_by_engine" args 0.3)
}

DANIELWW2
09-10-2010, 18:28
Very good joob men :beer2:.

KnightFandragon
09-10-2010, 20:58
Dude, that tank looks nice =D You made that thing in 3DS Max or something? Good work and nothing makes a mound of dead guys faster then a 105 and a 30mm Cannon muwhahah

Cromtec
10-10-2010, 00:06
The *.inc script looks fine from what I can see.
Did you link to your tank.inc section from the def file (props line)?
The props line should read something like props..."mars tank"...
I recommend to replace mars tank to mars_tank or something similar.

Check the turret section in the inc file. Additional guns must be registered there too.

Check the *.pattern files in ..set/stuff...folders. You need gun1, gun2 etc.
Each file needs the Foresight assignment within.

Check the vehicle.inc file. Add your additional Foresight bones there too.
Check your Foresight of the 30mm in the Max file. Is it Foresight11?

Another reason could be the setting/definition of the 30mm gun. Is it defined as an autocannon or as a machine gun?

RR_Raptor65
10-10-2010, 06:56
I don't think it requires that the tank.inc section be defined in the vehicle's props, noting the Calliope in this case, and I have a tank with a coaxial flamethrower which works without being defined as well. I tried it anyway when you mentioned it though, no change.

I looked over the turret section as well but I can't see anything that looked like it needed editing.

In the Max file I am 100% positive that the foresight is Foresight11.

I also added the Foresight bone to the vehicle.inc like so:

{on "init_gun"
{add_view "flash_gun_big" "flashbarrel3" "Foresight3"}
{add_view "flash_gun_big" "flashbarrel4" "Foresight4"}
{add_view "flash_gun_big" "flashbarrel5" "Foresight5"}
{add_view "flash_gun_big" "flashbarrel6" "Foresight6"}
{add_view "powdersmoke_big" "flashbarrel1s" "Foresight11"}
}

And it is present in this same format in the tank.inc as well.

I have the 30mm gun pattern set up like this:

{from "pattern gun" ; "Mars"
{tag "weapon build_in gun 30mm_mars"}
{foresight "Foresight11"}
{filling "bullet30" 15}
{fireSound "gun/30mm_autocannon/"}
{RecoveryTime 0.275}
{RechargeTime 6}
{reloadSound "flak38"}
{spreading
{spreadradius 1.4}
{SpreadXYRatio 4}
{SpreadPower 3}
}
{AimingTolerance 30}
{Automatic}
{burst
{short 2 1}
{long 5 2}
}
{speed 90}
{traceFreq 0.5}
("range_zenite")
("speed" s(1200))
("37-57caliber")
{projectileDamage 24}
{projectileDamageTable {10 30} {50 29} {100 27} {150 25} {200 24}}
{RelaxationTime 0}
{cursor "zenite_on"}
{cursorReloading "zenite_reload"}
}

Or do I need to create a duplicate gun.pattern and change the foresight there instead?

I mean if the Calliope works then this should too shouldn't it? The two are set up very similarly, though my tank has more code behind it. Perhaps I'll try changing the 30mm to Foresight2 like the Calliope.

Cromtec
10-10-2010, 09:31
Or do I need to create a duplicate gun.pattern and change the foresight there instead?

That's what I did for my T-35.
gun.pattern
gun1.pattern
...
The gun1 part is then edited in the inc file like you did.
Rename flashbarrel1 to flashbarrel11 or something.
1 is tied to Foresight1 I think.

RR_Raptor65
10-10-2010, 23:52
That did it, it works perfectly now, I even figured out what was wrong with the HE 30mm shells, it just needed the "size1" tag. Thanks for your help.