In Ench there are fire angel system, allowing artillery unit use different fire pitch for different weapon(a precise but shorter range and a long range but inaccurate one)
However I don't get its code's logic
First for different fire pitch there should be two turret, but.....
Turret = TURRET
TurretPitch = TURRETEL
AltTurret = TURRET
AltTurretPitch = TURRETEL
(shocking...)
Well I see if I just copy that there will be a problem, when the unit using its primary weapon. The turret will instantly recover to default state after fire,and will pitch from default if weapon change frome secondary to primary. And the author also said there is some code fixing it:
TransitionState = TRANS_UsingA TRANS_None
Model = AVM270
Animation = AVM270.AVM270
AnimationMode = ONCE
AnimationSpeedFactorRange = -3.0 -3.0
Turret = TURRET
TurretPitch = TURRETEL
WeaponLaunchBone = PRIMARY WeaponA
End
TransitionState = TRANS_UsingAReallyDamaged TRANS_ReallyDamaged
Model = AVM270_D
Animation = AVM270_D.AVM270_D
AnimationMode = ONCE
AnimationSpeedFactorRange = -3.0 -3.0
Turret = TURRET
TurretPitch = TURRETEL
WeaponLaunchBone = PRIMARY WeaponA
End
Can't figur out what it do and how it fix the problem....
can you also post the full W3DTankDraw,AIUpdateInterface and the weapon code?
Here is the full code of it. I just can't figur out how that anima should be. From what I seen myself, set both turret and alt-turret on same model part will cause one problem: if they have different firepitch(A and , change weapon(which belong to turret and alt-turret) will cause the model pitch change instantly between A and B, like it only depend on whether the pitch is finish but not really absolute pitch value
Draw = W3DTankDraw ModuleTag_01
OkToChangeModelColor = Yes
ConditionState = NONE
Model = AVM270_SW
Turret = TURRET
TurretPitch = TURRETEL
AltTurret = TURRET
AltTurretPitch = TURRETEL
WeaponLaunchBone = PRIMARY WeaponA
WeaponLaunchBone = SECONDARY WeaponA
TransitionKey = TRANS_None
End
AliasConditionState = DAMAGED
ConditionState = REALLYDAMAGED
Model = AVM270_SW_D
Turret = TURRET
TurretPitch = TURRETEL
WeaponLaunchBone = PRIMARY WeaponA
WeaponLaunchBone = SECONDARY WeaponA
TransitionKey = TRANS_ReallyDamaged
End
AliasConditionState = RUBBLE
ConditionState = USING_WEAPON_A
Model = AVM270_SW
Turret = TURRET
TurretPitch = TURRETEL
WeaponLaunchBone = PRIMARY WeaponA
TransitionKey = TRANS_UsingA
End
AliasConditionState = DAMAGED USING_WEAPON_A
ConditionState = REALLYDAMAGED USING_WEAPON_A
Model = AVM270_SW_D
Turret = TURRET
TurretPitch = TURRETEL
WeaponLaunchBone = PRIMARY WeaponA
TransitionKey = TRANS_UsingAReallyDamaged
End
AliasConditionState = RUBBLE USING_WEAPON_A
ConditionState = USING_WEAPON_B
Model = AVM270_SW
AltTurret = TURRET
AltTurretPitch = TURRETEL
WeaponLaunchBone = SECONDARY WeaponA
End
AliasConditionState = DAMAGED USING_WEAPON_B
ConditionState = REALLYDAMAGED USING_WEAPON_B
Model = AVM270_SW_D
AltTurret = TURRET
AltTurretPitch = TURRETEL
WeaponLaunchBone = SECONDARY WeaponA
End
AliasConditionState = RUBBLE USING_WEAPON_B
; This fixes a certain failed turret engine issue -VectorIV
; --------------------------------------------------------------------
TransitionState = TRANS_UsingA TRANS_None
Model = AVM270_SW
Animation = AVM270_SW.AVM270_SW
AnimationMode = ONCE
AnimationSpeedFactorRange = -3.0 -3.0
Turret = TURRET
TurretPitch = TURRETEL
WeaponLaunchBone = PRIMARY WeaponA
End
TransitionState = TRANS_UsingAReallyDamaged TRANS_ReallyDamaged
Model = AVM270_SW_D
Animation = AVM270_SW_D.AVM270_SW_D
AnimationMode = ONCE
AnimationSpeedFactorRange = -3.0 -3.0
Turret = TURRET
TurretPitch = TURRETEL
WeaponLaunchBone = PRIMARY WeaponA
End
; --------------------------------------------------------------------
TrackMarks = EXTnkTrack.tga
End
For the model, it is in Ench MOD
Here is its turret setting
Behavior = AIUpdateInterface ModuleTag_03
Turret
TurretTurnRate = 20 ; turn rate, in degrees per sec
TurretPitchRate = 10
FirePitch = 20 ; Instead of aiming pitchwise at the target, it will aim here
AllowsPitch = Yes
ControlledWeaponSlots = PRIMARY
End
AltTurret
TurretTurnRate = 20 ; turn rate, in degrees per sec
TurretPitchRate = 10
FirePitch = 55 ; Instead of aiming pitchwise at the target, it will aim here
AllowsPitch = Yes
ControlledWeaponSlots = SECONDARY
End
AutoAcquireEnemiesWhenIdle = No NotWhileAttacking
End
can't see a workaroud
in my testmodel the unit always rotate only on secondary weapon mode , primary weapon fire from a side and the turret like your's just go back to default position and don't rotate at all
maybe is me or the Engine is pretty shitty
2 different turret work just fine but not 2 of the "same" turret
I don't know, but it seems that the "re-positioning" of the artillery turret pitch is completed by an transition animation rather than "real" turret pitch angle change. Therefore I guess maybe they use the "AnimationSteeringUpdate" (which can be found in the original GLA combat bike) to ensure the transition animation is completed before acutal fire.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)