New animal pirate (EE4) Problem with this unit
Posted: 08 Sep 2018, 09:02
Hi everyone. I have successfully created a "bandit" animal with is heavymounted unit. But I have having troubles with a "pirate" animal which is heavyinfantry, perhaps because of complexity of musketer attack or otherwise. I adjoin code, though I think the problem could be in dbcombat.csv (I haven't changed this csv file). Any help would be vey much appreciated. The problem is when this unit shoots or is shooted the game crashes...
Code: Select all
UnitType Pirate
{
parent = LandAnimal
properties {
moveType = kUnitMoveType_Mounted
displayName = tx_utn_Pirate_name
hitpoints = 20
verboseTooltip = vtt_unit_Pirate
}
abilities = [
Attack { damage = 14; range = 10; reloadTime = 3; applyDamageTime = 0.2; missileName = "MusketBullet"; WeaponType = LightProjectile; PackTime = 2.00; UnpackTime = 2.00 }
LOS { range = 10 }
Move {speed = 1.7250; angSpeed = 720}
]
fullMapOverlay { sprite = spr_fullmap_smallunit ignoreOrientation = 1 }
}
UnitModel PirateBase
{
Parent = BaseLandAnimal
DefaultModel = prussianmusketer.nif
UIRenderingParams {
xOffset = 3.16
yOffset = 2.96
zOffset = -2.32
scale = 1.87
angle = 52.11
rotationSpeed = 0.00
pitch = 20.01
lightAngle = 30.00
lightPitch = 90.00
lightDiffuse = [50 50 45 255]
lightSpecular = [0 0 0 255]
lightAmbient = [40 40 40 255]
}
}
UnitModel Pirate
{
Parent = PirateBase
ChildNames = [ UnitShadow Muzzle_Musketeer ]
States = [
{ StateName = Idle AnimName = sh_musketeer_idle01.KF
AnimVariants = [ sh_musketeer_idle02.KF
sh_musketeer_season01.kf ]
AnimVariantsWeights = [0.3 0.1 ]
}
{ StateName = UnpackedIdle AnimName = sh_musketeer_unpackidle01.KF }
//{ StateName = Walk AnimName = sh_musketeer_walk01.KF }
{ StateName = Run AnimName = sh_musketeer_jog01.KF }
{ StateName = Attack1 AnimName = sh_musketeer_attack01.KF
TextKeys = [
{ Name = PLAY_SOUND Data = fx_musket_fire KeyTime = 0.16 }
] }
{ StateName = Pack AnimName = sh_musketeer_pack.KF }
{ StateName = Unpack AnimName = sh_musketeer_unpack.KF }
{ StateName = Death AnimName = sh_musketeer_unpackdeath01.KF }
{ StateName = PackedDeath AnimName = sh_musketeer_death01.KF }
{ StateName = Flinch AnimName = sh_musketeer_protect01.kf }
{ StateName = BeingThrown AnimName = sh_musketeer_flying01.kf
AnimVariants = [ sh_musketeer_flying02.kf ] AnimVariantsWeights = [ 0.5 ] }
{ StateName = ThrownDeath AnimName = sh_musketeer_ground_death01.kf }
]
}
UnitType DeadAnimalPirate
{
parent = DeadAnimal_LowFood
properties {
displayName = tx_utn_DeadPirate_name
VerboseTooltip = vtt_unit_DeadPirate
SizeX = 0.4
SizeY = 0.2
}
}
UnitModel DeadAnimalPirate
{
Parent = PirateBase
ChildNames = [ UnitShadow ]
DefaultState = Death
States = [
{ StateName = PackedDeath AnimName = sh_musketeer_unpackdeath01.KF }
]
UIRenderingParams {
xOffset = 6.58
yOffset = 7.89
zOffset = -5.36
scale = 2.17
angle = 52.11
rotationSpeed = 0.00
pitch = 20.01
lightAngle = 30.00
lightPitch = 90.00
lightDiffuse = [50 50 45 255]
lightSpecular = [0 0 0 255]
lightAmbient = [40 40 40 255]
}
}