Posted 28 May 2009 - 07:06 PM
Hi, I have been trying to create a beorn for my mod and am currently doing the bear coding. The problem is that the bear does not use any of the attacking animations which I have created.
I have put the following code into my object code file:
The attacking code:
// --- Attacking Anims
AnimationState = FIRING_OR_PREATTACK_A DISGUISED // Melee attack.
Animation
AnimationName = CUBear_SKL.CUBear_IDLF
AnimationMode = ONCE
UseWeaponTiming = NO
End
End
The
DISGUISED model condition is the one I am using to change between human and bear
The other bear animation code:
CODE
;The walking code
AnimationState = DISGUISED MOVING PANICKING
Animation = RUNA
AnimationName = CUBear_SKL.CUBear_RUNA
AnimationMode = LOOP
End
Flags = RANDOMSTART
End
AnimationState = DISGUISED MOVING
StateName = STATE_moving
Animation = Moving
AnimationName = CUBear_SKL.CUBear_WALKA
AnimationBlendTime = 10
AnimationMustCompleteBlend = yes
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Alert" then CurDrawableSetTransitionAnimState("TRANS_AlertToIdle") end
EndScript
End
;The death code
AnimationState = DISGUISED DYING
Animation = CUBear_DIEA
AnimationName = CUBear_SKL.CUBear_DIEA
AnimationMode = ONCE
End
End
;The idle code
AnimationState= DISGUISED
StateName = STATE_Idle
Animation = IdleA
AnimationName = CUBear_SKL.CUBear_IDLA
AnimationPriority = 10
AnimationMode = ONCE
AnimationBlendTime = 10
End
Animation = IdleB
AnimationName = CUBear_SKL.CUBear_IDLB
AnimationPriority = 10
AnimationMode = ONCE
AnimationBlendTime = 10
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Alert" then CurDrawableSetTransitionAnimState("TRANS_AlertToIdle") end
EndScript
End
I know that there is no problem with the animation model since I used the following code as a test:
AnimationState= DISGUISED
StateName = STATE_Idle
Animation = IdleA
AnimationName = CUBear_SKL.CUBear_IDLF
AnimationPriority = 10
AnimationMode = ONCE
AnimationBlendTime = 10
End
Animation = IdleB
AnimationName = CUBear_SKL.CUBear_IDLF
AnimationPriority = 10
AnimationMode = ONCE
AnimationBlendTime = 10
End
The animation model works fine when I use it as my idle animation. It is only when I use it as my attacking animation that nothing happens. This makes me think that it is my code not the animation model which is at fault.
_________________________________________________________________________
I have also created a special attack called bear pounce. Bear pounce is based on the earth shatter ability. The bear pounce kills all the nearby enemies as it should but the bear does not stand up and slam its front paws on the ground as it is supposed to.
This is my animation code for bear pounce:
AnimationState = SPECIAL_WEAPON_THREE DISGUISED // FIRING_OR_PREATTACK_C
StateName = Attacking
Animation = StaffLaser
AnimationName = CUBear_SKL.CUBear_IDLF// isitari's light?
AnimationMode = ONCE
End
FXEvent = Frame:30 Name:FX_GandalfStaffFlare
End
Is
SPECIAL_WEAPON_THREE the model condition I should use here?
My special power code for bear pounce:
Behaviour code:
CODE
;---------------------------Pounce-------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroBearPounceEnabler_Level1
SpecialPowerTemplate = SpecialAbilityCreateAHeroBearPounce
TriggeredBy = Upgrade_CreateAHeroBearPounce_Level1
End
Behavior = SpecialPowerModule ModuleTag_CreateAHeroBearPounceStarter_Level1
SpecialPowerTemplate = SpecialAbilityCreateAHeroBearPounce
UpdateModuleStartsAttack = Yes
StartsPaused = Yes
End
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_CreateAHeroBearPounceUpdate_Level1
SpecialPowerTemplate = SpecialAbilityCreateAHeroBearPounce
SpecialWeapon = CreateAHeroEarthShaker_Level1
WhichSpecialWeapon = 3 ; Corresponds to SPECIAL_WEAPON_THREE
StartAbilityRange = 1.0
SkipContinue = Yes
UnpackTime = 2000 ; Trigger on frame 60 (of 100)
PackTime = 1333 ; Remaining 40 frames (of 100)
MustFinishAbility = Yes
End