Page 1 of 1

Crossbow ordnance not firing straight

Posted: Tue Aug 20, 2013 9:31 am
by lucasfart
I'm in the process of setting up my crossbow to fire bolts, and I've come across a pretty annoying problem. The projectile is always fired way higher than the crosshairs - instead of coming out right in the crosshairs, its being fired vertically above them.

Its not a model problem, because it was working fine earlier when the ordnances were identical to the bowcaster. The most recent changes I've made are the animations called (rifle) and the classlabel. Any suggestions?

The Crossbow:
Hidden/Spoiler:
[WeaponClass]
ClassParent = "grenade"
GeometryName = "crossbow.msh"

[Properties]
GeometryName = "crossbow"
HighResGeometry = "crossbow"

AnimationBank = "rifle"

OrdnanceName = "mdv_weap_inf_crossbow_ord"

NextCharge = 0.9
OrdnanceName = "mdv_weap_inf_crossbow_ord"

Discharge = "small_smoke_effect"
MuzzleFlash = "med_muzzle_flash"

FlashColor = "255 198 62 255"
FlashLength = "0.075"
FlashLightColor = "255 198 62 175"

ChargeUpEffect = "com_sfx_chargeup"

RoundsPerClip = "5"
ReloadTime = "2.25"
HeatRecoverRate = "0.15"
HeatThreshold = "0.3"
HideOnFire = "0"

ZoomMin = "2.0"
ZoomMax = "2.0"
ZoomRate = "0.0"

AnimationBank = "rifle"
ForceFireAnimation = "0"

MaxPressedTime = "0.75"
TriggerSingle = "1"
ShotDelay = "1.5"

ShotElevate = "0.1"
PitchSpread = "0.0"
YawSpread = "0.0"

LockOnRange = "0.0"
LockTime = "0.0"
AutoAimSize = "1.0"

SalvoCount = "1"
ShotsPerSalvo = "1"
SalvoDelay = "0.0"
InitialSalvoDelay = "0.0"
SalvoTime = "0.0"

MinRange = "32"
OptimalRange = "64"
MaxRange = "80"
ExtremeRange = "96.0"

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"

ChargeRateLight = "1.0"
MaxChargeStrengthLight = "1.0"
ChargeDelayLight = "0.1"
ChargeRateHeavy = "1.0"
MaxChargeStrengthHeavy = "0.5"
ChargeDelayHeavy = "0.75"

RecoilLengthHeavy = "1.0"
RecoilStrengthHeavy = "1"
RecoilDecayHeavy = ".75"
The Ordnance:
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "shell"
GeometryName = "com_weap_missile.msh"

[Properties]

GeometryName = "com_weap_missile"
ImpactEffectWater = "com_sfx_watersplash_sm"

LifeSpan = "10.0"

MinSpeed = "20.0"
Acceleration = "80.0"
Velocity = "100.0"
Gravity = "4.0"
Rebound = "0.0"
TurnRate = "2.0"

WaverRate = "0.0"
WaverTurn = "0.0"



MaxDamage = "500.0"
DamageTransitionDelay = "0.0" //How long in seconds before the damage change begins.
DamageTransitionPeriod = "0.5" //How long in seconds the damage change lasts.
DamageFinalDamage = "1500.0" //What the damage would be at the end of the transition period. A negative value means that no change is applied.

VehicleScale = "1.0"
PersonScale = "1.0"
DroidScale = "1.0"
AnimalScale = "1.0"
BuildingScale = "1.0"

OrdnanceSound = "com_weap_inf_ord_hum_rocket"

BonusAmplification = "0.25" //how much more damage will be done when team_bonus_blaster_amplication is on
They're almost just a copy and paste of the stock mortar odf's. It might be worth mentioning that the weapon model dissappears while firing. I have the unit using the aalya animations. Could that be causing my problems?

Re: Crossbow ordnance not firing straight

Posted: Tue Aug 20, 2013 10:17 am
by Maveritchell
ShotElevate = "0.1"

Re: Crossbow ordnance not firing straight

Posted: Tue Aug 20, 2013 11:13 am
by lucasfart
Nope, I tried that. :( I don't just mean its off by a little bit. It literally fires at a point halfway between the centre and top of the screen. It almost seems like a grenade lob? Which would make sense if the weapon mesh disappears and the class-label is "grenade". So how did they make the mortar launcher work?

Another slightly weird thing: the map crashes unless I move the AnimationBank line to just under the geometry. I guess there's something weird with the animations involved...

EDIT: After tweaking it based on the ewok spear (thanks Mav!), its working a lot better. :) I still need to figure some things out, but at least it fires straight. :D Here's my new files:

Crossbow:
Hidden/Spoiler:
[WeaponClass]
ClassParent = "grenade"
GeometryName = "crossbow.msh"

[Properties]
GeometryName = "crossbow"
HighResGeometry = "crossbow"
AnimationBank = "rifle"

OrdnanceName = "mdv_weap_inf_crossbow_ord"

RoundsPerClip = "1"
ReloadTime = "1.25"

MinRange = "32"
OptimalRange = "64"
MaxRange = "80"
ExtremeRange = "96.0"

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"

InitialSalvoDelay = "0.3"
ShotElevate = "0.15"

Firesound ="com_weap_throw"
Ordnance:
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "sticky"
GeometryName = "com_weap_missile.msh"

[Properties]

GeometryName = "com_weap_missile"
ImpactEffectWater = "com_sfx_watersplash_sm"
ImpactEffect = "com_sfx_explosion_lg"

LifeSpan = "10.0"

MinSpeed = "20.0"
Velocity = "50.0"
Gravity = "4.0"
Rebound = "0.0"

AlignVertical = "0" (Doesn't change the angle to ground) :(

MaxDamage = "200.0"
DamageTransitionDelay = "0.0" //How long in seconds before the damage change begins.
DamageTransitionPeriod = "0.5" //How long in seconds the damage change lasts.
DamageFinalDamage = "400.0" //What the damage would be at the end of the transition period. A negative value means that no change is applied.

VehicleScale = "1.0"
PersonScale = "1.0"
DroidScale = "1.0"
AnimalScale = "1.0"
BuildingScale = "1.0"

OrdnanceSound = "com_weap_inf_ord_hum_rocket"
The problem I'm having now is that while the ordnance stays around and sticks to things, its always directly perpendicular, which is totally ridiculous. :( It doesn't keep the rotation that it had when hitting the object. So it doesn't matter what angle it hits the ground at it always sticks out vertically. I checked out the ewok spear and its the same. :(