Post by michael34 on Jul 12, 2011 11:17:17 GMT
Hi PZK has been long sorry for absence. I have created a new unit, shark, but i don't know how to fix it so that it attacks citizens or at least ships!! My shark swimms ok, just that it doesn't attack anybody
Here is the code:
//------------------------------------------------
// Shark
//------------------------------------------------
UnitType Shark
{
ownertype = PlayerOrWorld
parent = NavalShallow
properties {
rps = Predator
hitpoints = 600
SizeX = 2
SizeY = 2
displayName = tx_utn_Shark_name
DisplayNameScenEdit = tx_utn_Shark_sname
VerboseTooltip = vtt_unit_shark
}
abilities = [
Attack { range = 0.8; applyDamageTime = 0.5; damage = 50;}
LOS { range = 5 }
NavalMove {speed = 1.875; angSpeed = 180; cruisingDepth = 0.2 }
]
icon = icon_unit_pagoda
}
UnitModel Shark
{
Parent = BaseSubmarine
DefaultModel = Shark.nif
States = [
{ StateName = Idle }
{ StateName = Walk }
{ Statename = Explore }
{ StateName = Attack1 }
{ StateName = Death }
]
ChildNames = [ HugeGlow ExplSelectorBuild_Big ]
}
UnitType DeadAnimalShark
{
parent = DeadAnimal_HighFood
properties {
displayName = tx_utn_DeadShark_name
VerboseTooltip = vtt_unit_Deadshark
SizeX = 0.4
SizeY = 0.4
}
}
UnitModel DeadAnimalShark
{
Parent = Shark
DefaultState = Death
States = [
{ StateName = Death
AnimName = sh_fautiger_death01.kf
}
]
UIRenderingParams {
xOffset = 5.53
yOffset = 1.83
zOffset = -0.28
scale = 1.53
angle = 18.95
rotationSpeed = 0.00
pitch = 40.01
lightAngle = 30.00
lightPitch = 90.00
lightDiffuse = [50 50 45 255]
lightSpecular = [0 0 0 255]
lightAmbient = [40 40 40 255]
}
}
Here is the code:
//------------------------------------------------
// Shark
//------------------------------------------------
UnitType Shark
{
ownertype = PlayerOrWorld
parent = NavalShallow
properties {
rps = Predator
hitpoints = 600
SizeX = 2
SizeY = 2
displayName = tx_utn_Shark_name
DisplayNameScenEdit = tx_utn_Shark_sname
VerboseTooltip = vtt_unit_shark
}
abilities = [
Attack { range = 0.8; applyDamageTime = 0.5; damage = 50;}
LOS { range = 5 }
NavalMove {speed = 1.875; angSpeed = 180; cruisingDepth = 0.2 }
]
icon = icon_unit_pagoda
}
UnitModel Shark
{
Parent = BaseSubmarine
DefaultModel = Shark.nif
States = [
{ StateName = Idle }
{ StateName = Walk }
{ Statename = Explore }
{ StateName = Attack1 }
{ StateName = Death }
]
ChildNames = [ HugeGlow ExplSelectorBuild_Big ]
}
UnitType DeadAnimalShark
{
parent = DeadAnimal_HighFood
properties {
displayName = tx_utn_DeadShark_name
VerboseTooltip = vtt_unit_Deadshark
SizeX = 0.4
SizeY = 0.4
}
}
UnitModel DeadAnimalShark
{
Parent = Shark
DefaultState = Death
States = [
{ StateName = Death
AnimName = sh_fautiger_death01.kf
}
]
UIRenderingParams {
xOffset = 5.53
yOffset = 1.83
zOffset = -0.28
scale = 1.53
angle = 18.95
rotationSpeed = 0.00
pitch = 40.01
lightAngle = 30.00
lightPitch = 90.00
lightDiffuse = [50 50 45 255]
lightSpecular = [0 0 0 255]
lightAmbient = [40 40 40 255]
}
}