IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
About fire angel system...
A34Comet
post 19 Apr 2018, 12:59
Post #1



Group Icon

Group: Members
Posts: 149
Joined: 1 March 2014
From: China(Mainland)
Member No.: 10320



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....
Go to the top of the page
 
+Quote Post
Omeka88
post 22 Apr 2018, 18:07
Post #2



Group Icon

Group: Members
Posts: 48
Joined: 14 July 2017
From: Roma
Member No.: 15601



can you also post the full W3DTankDraw,AIUpdateInterface and the weapon code?

This post has been edited by Omeka88: 22 Apr 2018, 18:17


--------------------
Go to the top of the page
 
+Quote Post
A34Comet
post 23 Apr 2018, 13:28
Post #3



Group Icon

Group: Members
Posts: 149
Joined: 1 March 2014
From: China(Mainland)
Member No.: 10320



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 cool.gif, 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
Go to the top of the page
 
+Quote Post
A34Comet
post 23 Apr 2018, 13:30
Post #4



Group Icon

Group: Members
Posts: 149
Joined: 1 March 2014
From: China(Mainland)
Member No.: 10320



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
Go to the top of the page
 
+Quote Post
Omeka88
post 23 Apr 2018, 23:19
Post #5



Group Icon

Group: Members
Posts: 48
Joined: 14 July 2017
From: Roma
Member No.: 15601



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


--------------------
Go to the top of the page
 
+Quote Post
ai_beyondcontrol
post 17 Feb 2019, 5:12
Post #6



Group Icon

Group: Members
Posts: 46
Joined: 18 June 2015
From: Shanghai,China
Member No.: 11608



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.

CODE
Behavior = AnimationSteeringUpdate ModuleTag_17
    MinTransitionTime = 300
End


Also, I guess to make sure WeaponB won't fire on its own until the pitch angle change animation is played, maybe there're a few Pre-Attack parameters in its Weapon.ini setting. Weapon A vice versa.

Since I never played the mod you mentioned (Also I didn't find it in Moddb lol ), I suggest posting the full code of this unit if the suggested mechanism is not the actual case.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 19 March 2024 - 10:43