Posted by: unnem - Saturday, April 20, 2013 1:43:56 PM
I made an unit something like raptor but have no taxing locomotor also don't dying when out of ammo.
Well it has unlimited ammo. Just when its attacking something sometimes that unit doing his job and sometimes just fire only once - fly forward then stop and starting doing circles at edge of map.
Anyone know whats wrong?
code:
[code]
Object object
SelectPortrait = SSSpySat
ButtonImage = SSSpySat
Draw = W3DModelDraw ModuleTag_01
ExtraPublicBone = WeaponA
ExtraPublicBone = WeaponB
DefaultConditionState
Model = model
WeaponLaunchBone = PRIMARY WeaponA
WeaponLaunchBone = SECONDARY WeaponB
ParticleSysBone = FXBONE01 Cloud
ParticleSysBone = FXBONE02 Cloud
End
OkToChangeModelColor = Yes
End
; ***DESIGN parameters ***
DisplayName = OBJECT:something
EditorSorting = VEHICLE
Side = Zombie
TransportSlotCount = 0 ;how many "slots" we take in a transport (0 == not transportable)
VisionRange = 200.0
ShroudClearingRange = 400
WeaponSet
Conditions = None
Weapon = PRIMARY Missilesdoom
Weapon = SECONDARY Missilesdoom
End
ArmorSet
Conditions = None
Armor = ArmorSmall
DamageFX = DamageFXSmall
End
BuildCost = 1111
BuildTime = 20
ExperienceValue = 75 75 125 175 ;Experience point value at each level
ExperienceRequired = 0 100 200 400 ;Experience points needed to gain each level
IsTrainable = Yes ;Can gain experience
CrusherLevel = 1
CrushableLevel = 2
CommandSet = AmericaJetRaptorCommandSet
; *** AUDIO Parameters ***
SoundAmbient = B52AmbientLoop
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
Body = ActiveBody ModuleTag_02
MaxHealth = 640.0
InitialHealth = 640.0
End
Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes
End
Behavior = JetSlowDeathBehavior ModuleTag_05
FXOnGroundDeath = FX_JetOnGroundDeath
OCLOnGroundDeath = OCL_RaptorDeathFinalBlowUp
DestructionDelay = 99999999
RollRate = 0.2
RollRateDelta = 100% ;each frame, rollrate = rollrate * rollrateDelta
PitchRate = -35.0
FallHowFast = 110.0%
FXInitialDeath = FX_RaptorDeathInitial
OCLInitialDeath = OCL_RaptorDeathInitial
DelaySecondaryFromInitialDeath = 500 ; in milliseconds
FXSecondary = FX_JetDeathSecondary
OCLSecondary = OCL_RaptorDeathSecondary
FXHitGround = FX_JetDeathHitGround
OCLHitGround = OCL_RaptorDeathHitGround
DelayFinalBlowUpFromHitGround = 200 ; in milliseconds
FXFinalBlowUp = FX_JetDeathFinalBlowUp
OCLFinalBlowUp = OCL_RaptorDeathFinalBlowUp
End
Behavior = PhysicsBehavior ModuleTag_07
Mass = 500.0
End
Behavior = TransitionDamageFX ModuleTag_08
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
End
Behavior = JetAIUpdate ModuleTag_09
OutOfAmmoDamagePerSecond = 0%
TakeoffDistForMaxLift = 0%
TakeoffPause = 500
MinHeight = 5
End
Locomotor = SET_NORMAL Locomotor
Behavior = FlammableUpdate ModuleTag_21
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 3 ; taking this much damage...
AflameDamageDelay = 500 ; this often.
End
Geometry = Box
GeometryIsSmall = Yes
GeometryMajorRadius = 14.0
GeometryMinorRadius = 7.0
GeometryHeight = 5.0
Shadow = SHADOW_VOLUME
ShadowSizeX = 89 ; minimum elevation angle above horizon. Used to limit shadow length.
End[/code]
Locomotor Code:
[code]
Locomotor Locomotor
Surfaces = AIR
Speed = 200
SpeedDamaged = 200
MinSpeed = 160 ; in dist/sec
TurnRate = 110 ; in degrees/sec
TurnRateDamaged = 110 ; in degrees/sec
Acceleration = 110 ; in dist/(sec^2)
AccelerationDamaged = 110 ; in dist/(sec^2)
Lift = 80 ; in dist/(sec^2)
LiftDamaged = 80 ; in dist/(sec^2)
Braking = 100 ; in dist/(sec^2)
MinTurnSpeed = 150 ; in dist/sec
PreferredHeight = 100
AllowAirborneMotiveForce = Yes
ZAxisBehavior = SURFACE_RELATIVE_HEIGHT
CirclingRadius = 50 ; the radius at which we circle when we are trying to maintain position.
; (pos = clockwise, neg = ccw, 0 = calc smallest possible radius given our speed, turning, etc)
Appearance = WINGS
PitchInDirectionOfZVelFactor = 1 ; how much to pitch according to our z-vel. 0=none, 1=lots (0=default)
PitchStiffness = 1 ; stiffness of the "springs" in the suspension forward & back.
RollStiffness = 1 ; stiffness of the "springs" in the suspension side to side.
PitchDamping = 1 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain.
RollDamping = 1 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain.
ForwardVelocityPitchFactor = 0 ; How much velocity will cause the front to lift/dip
LateralVelocityRollFactor = 0.5 ; How much cornering will cause the chassis to roll.
Apply2DFrictionWhenAirborne = Yes
AirborneTargetingHeight = 30
LocomotorWorksWhenDead = Yes ; JetSlowDeathBehavior needs this to function correctly
End
[/code]
Weapon Code:
[code]
Weapon Missilesdoom
PrimaryDamage = 33.3
PrimaryDamageRadius = 25.0
ScatterRadiusVsInfantry = 15.0
AttackRange = 450.0
MinimumAttackRange = 33.0
AcceptableAimDelta = 30
DamageType = EXPLOSION
DeathType = EXPLODED
WeaponSpeed = 1000
ProjectileObject = Missiles
ProjectileExhaust = MissileExhaust
FireFX = None
FireSound = RaptorJetMissileWeapon
ProjectileDetonationFX = FX_AuroraBombDetonate
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
ScatterRadius = 350 ;yes!
DelayBetweenShots = 100
ClipSize = 6 ; !
ClipReloadTime = 2000
AutoReloadsClip = Yes
ProjectileCollidesWith = STRUCTURES
AntiAirborneVehicle = Yes
AntiAirborneInfantry = No
ShowsAmmoPips = No
End
[/code]
---Id like to make it stay where it is when enemy is killed. But always when it kills enemy its flying to edge of map and stops there doing circles also sometimes flying there even if enemy isnt killed at all.
Posted by: Rrtaya_tsamsiyu - Saturday, April 20, 2013 5:45:56 PM
what unit's code did you make your unit code out of? i would have used the Comanche's code, and just changed the locomoter and weapon. Using Comanche stuff, instead of raptor or something else should keep it from going to the edge of the map.
Posted by: qqqqqqqqqp - Saturday, April 20, 2013 6:34:24 PM
Could it be the turn rate in the Locomotor.(I dont think so)
Also the Guard distance goes with the vision (I think)So if it is suppose 1000 vision its Guard radius is friggin Huge.
But really I dont see why it shouldn't work
Just noticed something Dont the locomotor must have a MAX turn rate (i only see min turn rate)?S
Posted by: Rrtaya_tsamsiyu - Saturday, April 20, 2013 7:26:13 PM
theres a min turn speed, which is there, but there isend a minimum turn rate or a max, is just turn rate.
Posted by: qqqqqqqqqp - Saturday, April 20, 2013 7:39:16 PM
I now have looked at a locomotor and well didn't see the max turnspeed so forget what i said and go with what rrtaya gots to say.(And when in doubt SCRAP IT and start over better to start new and get it correct then have something mess up).