Jump to content


Photo

Getting weapon toggle to work for Elves


  • Please log in to reply
8 replies to this topic

#1 Ar-Zontar

Ar-Zontar
  • Members
  • 40 posts
  • Location:Rockwood, ON

Posted 20 December 2005 - 02:16 PM

Well, I've fumbled along with this, but not really sure where I've gone wrong - I haven't given up but wonder if anyone out there can clarify this scenario for me.

I have created a Elven Vanyar character, designed to be a horde. The model is the same as the RohanElvenWarrior - the Vanyar are supposed to be able to use both sword and bow. So I have am able to get the units to appear via a hero Summon (smoke show works great thanks to help from folks on this forum), but when they arrive, the toggle weapon does not work (in one case the units suddenly become separated from the hordes, and the commandset disappears!).

Do I need to post all the .ini's, or is there a rule of thumb someone can tell me I should be looking for ??? I have commandsets for ElvenVanyarCommandset, ElvenVanyarHordeCommandset, ElvenVanyarHordeCommandset_Summoned .

I hope I can get this baby done before BFME2 comes out ...

Thanks again for this forum and it's members (hostile) - a true gem among modding newsgroups! :p

Edited by Ar-Zontar, 20 December 2005 - 02:16 PM.


#2 Artifice

Artifice

    title available

  • Members
  • 382 posts
  • Location:Texas

Posted 20 December 2005 - 07:17 PM

I think I would need to see the unit and commandset ini. If you just copied the elven warrior and changed their skin there should be no problem.

#3 Ar-Zontar

Ar-Zontar
  • Members
  • 40 posts
  • Location:Rockwood, ON

Posted 20 December 2005 - 08:46 PM

I think I would need to see the unit and commandset ini. If you just copied the elven warrior and changed their skin there should be no problem.

<{POST_SNAPBACK}>



Well, they are the same unit, just named something different (my plan is to give them different hit points and attack values than the summoned rohan elves) ... maybe i'll post up the INI's and see what happens ...

thanks!

#4 Ar-Zontar

Ar-Zontar
  • Members
  • 40 posts
  • Location:Rockwood, ON

Posted 21 December 2005 - 09:52 PM

I think I would need to see the unit and commandset ini. If you just copied the elven warrior and changed their skin there should be no problem.

<{POST_SNAPBACK}>



Well, they are the same unit, just named something different (my plan is to give them different hit points and attack values than the summoned rohan elves) ... maybe i'll post up the INI's and see what happens ...

thanks!

<{POST_SNAPBACK}>



OK - here's the INI stuff..

COMMANDSET.INI

CommandSet ElvenVanyarHordeCommandSet_Summoned
	1 = Command_Guard
	2 = Command_ToggleVanyarWeapon
;2 = Command_ToggleElvenWarriorWeapon
	13 = Command_AttackMove
	14 = Command_Stop
        15 = Command_Guard
End



[codebox]GONDORINFANTRY.INI

;------------------------------------------------------------------------------
;
; ElvenVanyarInfantry.ini
;
;------------------------------------------------------------------------------

; aka Gondor Elven Vanyar Warrior
Object ElvenVanyar
; ***ART Parameters ***

SelectPortrait = UPRohan_ElvenWarrior

Draw = W3DHordeModelDraw ModuleTag_01

OkToChangeModelColor = Yes

StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD
LodOptions = LOW
AllowMultipleModels = ALLOW_MULTIPLE_MODELS_LOW
MaxRandomTextures = MAX_RANDOM_TEXTURES_LOW
MaxRandomAnimations = MAX_RANDOM_ANIMATIONS_LOW
MaxAnimFrameDelta = MAX_ANIM_FRAME_DELTA_LOW
End

LodOptions = MEDIUM
AllowMultipleModels = ALLOW_MULTIPLE_MODELS_MED
MaxRandomTextures = MAX_RANDOM_TEXTURES_MED
MaxRandomAnimations = MAX_RANDOM_ANIMATIONS_MED
MaxAnimFrameDelta = MAX_ANIM_FRAME_DELTA_MED
End

LodOptions = HIGH
AllowMultipleModels = ALLOW_MULTIPLE_MODELS_HIGH
MaxRandomTextures = MAX_RANDOM_TEXTURES_HIGH
MaxRandomAnimations = MAX_RANDOM_ANIMATIONS_HIGH
MaxAnimFrameDelta = MAX_ANIM_FRAME_DELTA_HIGH
End

;;====================== MODELS ================================================================
DefaultModelConditionState
Model = RUElfWar_SKN
Skeleton = RUElfWar_SKL
WeaponLaunchBone = PRIMARY ARROW
WeaponLaunchBone = SECONDARY ARROWNOCK ; when upgraded to flaming arrow
End

; --------- With Sword ------------
ModelConditionState = WEAPONSET_TOGGLE_1
Model = RUElfWar_SKN
Skeleton = RUElfWar_SKL
End

; --------- With Fire arrows Upgrade ------------
ModelConditionState = WEAPONSET_PLAYER_UPGRADE USER_4
Model = RUElfWar_SKN
Skeleton = RUElfWar_SKL
WeaponLaunchBone = PRIMARY ARROW
WeaponLaunchBone = SECONDARY ARROWNOCK ; when upgraded to flaming arrow
; ParticleSysBone = FireArowTip arrowFire FollowBone:Yes
; ParticleSysBone = FireArowTip arrowFire FollowBone:Yes
End

RandomTexture = withelvesskin.tga 0 RUelvnworrior.tga
RandomTexture = withelvesskin.tga 0 RUelvnworrior_b.tga
RandomTexture = withelvesskin.tga 0 RUelvnworrior_l.tga
RandomTexture = withelvesskin.tga 0 RUelvnworriorha.tga

;;================== ANIMATIONS =================================================================

; ------ Flying ------- ;

AnimationState = PASSENGER WEAPONSET_TOGGLE_1
StateName = STATE_Grabbed
Animation = Sword
AnimationName = RUElfWar_FLLA
AnimationMode = LOOP
End
End

AnimationState = PASSENGER
StateName = STATE_Grabbed
Animation = Bow
AnimationName = RUElfWar_FLLB
AnimationMode = LOOP
End
End

AnimationState = FREEFALL WEAPONSET_TOGGLE_1
StateName = STATE_Falling
Animation = Sword
AnimationName = RUElfWar_FLYB
AnimationMode = LOOP
AnimationBlendTime = 10
AnimationSpeedFactorRange = 0.24 0.24
End
End

AnimationState = FREEFALL
StateName = STATE_Falling
Animation = Bow
AnimationName = RUElfWar_FLYA
AnimationMode = LOOP
AnimationBlendTime = 10
AnimationSpeedFactorRange = 0.5 0.5
End
End

AnimationState = STUNNED_FLAILING WEAPONSET_TOGGLE_1
StateName = STATE_Fly
Animation = Sword
AnimationName = RUElfWar_FLYB
AnimationMode = LOOP
End
Flags = MAINTAIN_FRAME_ACROSS_STATES2
BeginScript
PrevState = CurDrawablePrevAnimationState()
PrevAnim = CurDrawablePrevAnimation()
if PrevState == "Ready_Bow" or PrevState == "Moving_Bow" or PrevState == "Bored_Bow" ;;;;;;#TODO put in various bow states here
then
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
return "WantSword"
elseif PrevState == "STATE_Fly"
then
if PrevAnim == "Bow" or PrevAnim == "WantSword"
then
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
return "WantSword"
end
end

CurDrawableHideSubObject("ArrowNock")
CurDrawableHideSubObject("arrow")
return "Sword"
EndScript
End

AnimationState = STUNNED_FLAILING
StateName = STATE_Fly
Animation
AnimationName = RUElfWar_FLYA
AnimationMode = LOOP
End
Flags = MAINTAIN_FRAME_ACROSS_STATES2
End

AnimationState = DYING DEATH_1 SPLATTED WEAPONSET_TOGGLE_1
StateName = STATE_Dead
Animation = Sword
AnimationName = RUElfWar_LNDB
AnimationMode = ONCE
End
End

AnimationState = DYING DEATH_1 SPLATTED
StateName = STATE_Dead
Animation = Bow
AnimationName = RUElfWar_LNDA
AnimationMode = ONCE
End
End

; ------ Dying ------- ;

AnimationState = DYING DEATH_1 WEAPONSET_TOGGLE_1
Animation = Sword1
AnimationName = RUElfWar_DIESv5
AnimationMode = ONCE
End
Animation = Sword2
AnimationName = RUElfWar_DIESV4
AnimationMode = ONCE
End
Animation = WantSword
AnimationName = RUElfWar_LNDA
AnimationMode = ONCE
End

BeginScript
PrevState = CurDrawablePrevAnimationState()
PrevAnim = CurDrawablePrevAnimation()
if PrevState == "STATE_Fly"
then
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
return "WantSword"
end

CurDrawableHideSubObject("ArrowNock")
CurDrawableHideSubObject("arrow")
if GetClientRandomNumberReal(0,2) < 1
then
return "Sword1"
else
return "Sword2"
end
EndScript
End

AnimationState = DYING DEATH_2 WEAPONSET_TOGGLE_1
Animation = FadeOut
AnimationName = RUElfWar_IDLG
AnimationMode = LOOP
End
End

AnimationState = DYING DEATH_1
Animation = Bow1
AnimationName = RUElfWar_DIEB
AnimationMode = ONCE
End
Animation = Bow2
AnimationName = RUElfWar_DIEBV5
AnimationMode = ONCE
End
Animation = WantBow
AnimationName = RUElfWar_LNDB
AnimationMode = ONCE
End
BeginScript
PrevState = CurDrawablePrevAnimationState()
PrevAnim = CurDrawablePrevAnimation()

if PrevState == "STATE_Fly"
then
CurDrawableHideSubObject("ArrowNock")
CurDrawableHideSubObject("arrow")
return "WantBow"
end

if GetClientRandomNumberReal(0,2) < 1
then
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
return "Bow1"
else
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
return "Bow2"
end
EndScript
End

AnimationState = DYING DEATH_2
Animation = FadeOut
AnimationName = RUElfWar_IDLDX1
AnimationMode = ONCE
End
End


AnimationState = STUNNED_STANDING_UP WEAPONSET_TOGGLE_1
StateName = STATE_GetUp
Animation = Sword
AnimationName = RUElfWar_GTPSX1
AnimationMode = ONCE
End
Animation = WantSword
AnimationName = RUElfWar_GTPB
AnimationMode = ONCE
End
Flags = MAINTAIN_FRAME_ACROSS_STATES4
BeginScript
PrevState = CurDrawablePrevAnimationState()
PrevAnim = CurDrawablePrevAnimation()
if PrevState == "STATE_GetUp" or PrevState == "STATE_Land"
then
if PrevAnim == "Bow" or PrevAnim == "WantSword"
then
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
return "WantSword"
end
end

CurDrawableHideSubObject("ArrowNock")
CurDrawableHideSubObject("arrow")
return "Sword"
EndScript
End



AnimationState = STUNNED_STANDING_UP
StateName = STATE_GetUp
Animation = Bow
AnimationName = RUElfWar_GTPB
AnimationMode = ONCE
End
Animation = WantBow
AnimationName = RUElfWar_GTPSX1
AnimationMode = ONCE
End
Flags = MAINTAIN_FRAME_ACROSS_STATES4
BeginScript
PrevState = CurDrawablePrevAnimationState()
PrevAnim = CurDrawablePrevAnimation()
if PrevState == "STATE_GetUp" or PrevState == "STATE_Land"
then
if PrevAnim == "WantBow" or PrevAnim == "Sword"
then
CurDrawableHideSubObject("ArrowNock")
CurDrawableHideSubObject("arrow")
return "WantBow"
end
else
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
return "Bow"
end
EndScript
End

AnimationState = STUNNED WEAPONSET_TOGGLE_1
StateName = STATE_Land
Animation = Sword
AnimationName = RUElfWar_LNDB
AnimationMode = ONCE
End
Animation = WantSword
AnimationName = RUElfWar_LNDA
AnimationMode = ONCE
End
BeginScript
PrevState = CurDrawablePrevAnimationState()
PrevAnim = CurDrawablePrevAnimation()
if PrevState == "STATE_Fly"
then
if PrevAnim == "WantSword" or PrevAnim == "Bow"
then
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
return "WantSword"
end
end
Flags = MAINTAIN_FRAME_ACROSS_STATES3
CurDrawableHideSubObject("ArrowNock")
CurDrawableHideSubObject("arrow")
return "Sword"
EndScript
End

AnimationState = STUNNED
StateName = STATE_Land
Animation = Bow
AnimationName = RUElfWar_LNDA
AnimationMode = ONCE
End
Animation = WantBow
AnimationName = RUElfWar_LNDB
AnimationMode = ONCE
End
Flags = MAINTAIN_FRAME_ACROSS_STATES3
BeginScript
PrevState = CurDrawablePrevAnimationState()
PrevAnim = CurDrawablePrevAnimation()
if PrevState == "STATE_Fly"
then
if PrevAnim == "WantBow" or PrevAnim == "Sword"
then
CurDrawableHideSubObject("ArrowNock")
CurDrawableHideSubObject("arrow")
return "WantBow"
end
end

CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
return "Bow"
EndScript
End



;;======== TERROR

AnimationState = MOVING EMOTION_TERROR WEAPONSET_TOGGLE_1
StateName = Moving_Sword
Animation = Terror
AnimationName = RUElfWar_RUNN
AnimationMode = LOOP
Distance = 40
End
Animation = finishrun_b
AnimationName = RUElfWar_RUNB
AnimationMode = ONCE
AnimationBlendTime = 0
Distance = 40
End
Animation = runtrans_bs
AnimationName = RUElfWar_RUNC
AnimationMode = ONCE
AnimationBlendTime = 5
Distance = 70
End
Animation = runtrans_sb_finish
AnimationName = RUElfWar_RUNT
AnimationMode = ONCE
AnimationBlendTime = 0
Distance = 70
End
Animation = runnoblend_s
AnimationName = RUElfWar_RUNN
AnimationMode = LOOP
AnimationBlendTime = 0
Distance = 40
End
Flags = RESTART_ANIM_WHEN_COMPLETE MAINTAIN_FRAME_ACROSS_STATES
BeginScript
PrevAnim = CurDrawablePrevAnimation()
PrevState = CurDrawablePrevAnimationState()
CurDrawableHideSubObject("ARROW")
CurDrawableHideSubObject("ARROWNOCK")

if PrevState == "Moving_Bow"
then
if PrevAnim == "runtrans_sb"
then
return "runtrans_sb_finish"
elseif PrevAnim == "finishrun_s"
then
return "runnoblend_s"
else
return "finishrun_b"
end
elseif PrevAnim == "finishrun_b" or PrevAnim == "runtrans_sb_finish"
then
return "runtrans_bs"
elseif PrevAnim == "runtrans_bs" or PrevAnim == "run_s" or PrevAnim == "runnoblend_s"
then
return "runnoblend_s"
else
return "Terror"
end
EndScript
End
AnimationState = MOVING EMOTION_TERROR
StateName = Moving_Bow
Animation = RunAway_3
AnimationName = RUElfWar_RUNOT3
AnimationMode = ONCE
Distance = 40
End
Animation = RunAway_2
AnimationName = RUElfWar_RUNOT4
AnimationMode = ONCE
Distance = 40
End
Animation = RunAway
AnimationName = RUElfWar_RUNB
AnimationMode = ONCE
Distance = 40
End
Animation = finishrun_s
AnimationName = RUElfWar_RUNN
AnimationMode = ONCE
AnimationBlendTime = 0
Distance = 40
End
Animation = runtrans_sb
AnimationName = RUElfWar_RUNT
AnimationMode = ONCE
AnimationBlendTime = 5
Distance = 70
End
Animation = runtrans_bs_finish
AnimationName = RUElfWar_RUNC
AnimationMode = ONCE
AnimationBlendTime = 0
Distance = 70
End
Animation = RunAway_noblend
AnimationName = RUElfWar_RUNB
AnimationMode = ONCE
AnimationBlendTime = 0
Distance = 40
End
Flags = RESTART_ANIM_WHEN_COMPLETE MAINTAIN_FRAME_ACROSS_STATES
BeginScript
PrevAnim = CurDrawablePrevAnimation()
PrevState = CurDrawablePrevAnimationState()
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")

if PrevState == "Moving_Sword"
then
if PrevAnim == "runtrans_bs"
then
return "runtrans_bs_finish"
elseif PrevAnim == "finishrun_b"
then
return "RunAway_noblend"
else
return "finishrun_s"
end
elseif PrevAnim == "finishrun_s" or PrevAnim == "runtrans_bs_finish"
then
return "runtrans_sb"
elseif PrevAnim == "runtrans_sb" or PrevAnim == "run_b" or PrevAnim == "runnoblend_b"
then
return "RunAway_noblend"
else
Num = GetClientRandomNumberReal(0,7)
if Num < 1
then
return "RunAway_2"
elseif Num > 6
then
return "RunAway_3"
else
return "RunAway"
end
end
EndScript
End


; ------ Attacking ------- ;

AnimationState = FIRING_OR_PREATTACK_A WEAPONSET_TOGGLE_1
StateName = Ready_Sword

Animation = AttackWithSwordA
AnimationName = RUElfWar_ATKSV2
AnimationMode = ONCE
UseWeaponTiming = Yes
End
Animation = AttackWithSwordB
AnimationName = RUElfWar_ATKS
AnimationMode = ONCE
UseWeaponTiming = Yes
End
Animation = AttackWithSwordD
AnimationName = RUElfWar_ATKSV4
AnimationMode = ONCE
UseWeaponTiming = Yes
End
BeginScript
CurDrawableHideSubObject("ArrowNock")
CurDrawableHideSubObject("arrow")
EndScript
End
;;---------------------------------------------------------------------------<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
AnimationState = PREATTACK_A
Animation = ReadyToDrawn
AnimationName = RUElfWar_ATKA1
AnimationMode = ONCE
AnimationBlendTime = 20 ; Must be 0 blend time otherwise the arrow will linger for the duration of the blend!
End

BeginScript
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("ArrowNock")
EndScript
End

AnimationState = FIRING_OR_RELOADING_A
StateName = STATE_Firing
Animation = OneFrameOfShooting
AnimationName = RUElfWar_ATKA2
AnimationMode = ONCE
AnimationBlendTime = 0
AnimationSpeedFactorRange = 1.5 1.5
End
Flags = START_FRAME_FIRST
BeginScript
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("ArrowNock")
EndScript
End
;;--------------------------------------------------------------------------------<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


;;------------------------- BACKUP --------------------------------------------------------------------


AnimationState = MOVING BACKING_UP WEAPONSET_TOGGLE_1
StateName = STATE_BackingUp
Animation = Sword
AnimationName = RUElfWar_BAKS
AnimationMode = LOOP
End
Animation = WantSword
AnimationName = RUElfWar_BAKB
AnimationMode = LOOP
End
Flags = MAINTAIN_FRAME_ACROSS_STATES4
BeginScript
CurDrawableHideSubObject("ARROW")
CurDrawableHideSubObject("ARROWNOCK")
PrevAnim = CurDrawablePrevAnimation()
PrevState = CurDrawablePrevAnimationState()
if PrevState == "STATE_BackingUp"
then
if PrevAnim == "Bow" or PrevAnim == "WantSword"
then
return "WantSword"
end
end

return "Sword"
EndScript
End
AnimationState = MOVING BACKING_UP
StateName = STATE_BackingUp
Animation = Bow
AnimationName = RUElfWar_BAKB
AnimationMode = LOOP
End
Animation = WantBow
AnimationName = RUElfWar_BAKS
AnimationMode = LOOP
End
Flags = MAINTAIN_FRAME_ACROSS_STATES4
BeginScript
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
PrevAnim = CurDrawablePrevAnimation()
PrevState = CurDrawablePrevAnimationState()
if PrevState == "STATE_BackingUp"
then
if PrevAnim == "WantBow" or PrevAnim == "Sword"
then
return "WantBow"
end
end

return "Bow"
EndScript
End

; ------------ Moving ------------- ;

AnimationState = MOVING WEAPONSET_TOGGLE_1
StateName = Moving_Sword
SimilarRestart = Yes
Animation = run_s
AnimationName = RUElfWar_RUNS
AnimationMode = LOOP
Distance = 40
End
Animation = finishrun_b
AnimationName = RUElfWar_RUNB
AnimationMode = ONCE
AnimationBlendTime = 0
Distance = 40
End
Animation = runtrans_bs
AnimationName = RUElfWar_RUNC
AnimationMode = ONCE
AnimationBlendTime = 0
Distance = 70
End
Animation = runtrans_sb_finish
AnimationName = RUElfWar_RUNT
AnimationMode = ONCE
AnimationBlendTime = 0
Distance = 70
End
Animation = runnoblend_s
AnimationName = RUElfWar_RUNS
AnimationMode = LOOP
AnimationBlendTime = 0
Distance = 40
End
Flags = MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
BeginScript
PrevAnim = CurDrawablePrevAnimation()
PrevState = CurDrawablePrevAnimationState()
CurDrawableHideSubObject("ARROW")
CurDrawableHideSubObject("ARROWNOCK")

if PrevState == "Moving_Bow"
then
if PrevAnim == "runtrans_sb"
then
return "runtrans_sb_finish"
elseif PrevAnim == "finishrun_s"
then
return "runnoblend_s"
else
return "finishrun_b"
end
elseif PrevAnim == "finishrun_b" or PrevAnim == "runtrans_sb_finish" or PrevAnim == "WantSword"
then
return "runtrans_bs"
elseif PrevAnim == "runtrans_bs" or PrevAnim == "run_s" or PrevAnim == "runnoblend_s"
then
return "runnoblend_s"
else
return "run_s"
end
EndScript
End

AnimationState = MOVING
StateName = Moving_Bow
SimilarRestart = Yes
Animation = run_b
AnimationName = RUElfWar_RUNB
AnimationMode = LOOP
Distance = 40
End
Animation = finishrun_s
AnimationName = RUElfWar_RUNS
AnimationMode = ONCE
AnimationBlendTime = 0
Distance = 40
End
Animation = runtrans_sb
AnimationName = RUElfWar_RUNT
AnimationMode = ONCE
AnimationBlendTime = 0
Distance = 70
End
Animation = runtrans_bs_finish
AnimationName = RUElfWar_RUNC
AnimationMode = ONCE
AnimationBlendTime = 0
Distance = 70
End
Animation = runnoblend_b
AnimationName = RUElfWar_RUNB
AnimationMode = LOOP
AnimationBlendTime = 0
Distance = 40
End
Flags = MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE

BeginScript
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
PrevAnim = CurDrawablePrevAnimation()
PrevState = CurDrawablePrevAnimationState()

if PrevState == "Moving_Sword"
then
if PrevAnim == "runtrans_bs"
then
return "runtrans_bs_finish"
elseif PrevAnim == "finishrun_b"
then
return "runnoblend_b"
else
return "finishrun_s"
end
elseif PrevAnim == "finishrun_s" or PrevAnim == "runtrans_bs_finish" or PrevAnim == "WantBow"
then
return "runtrans_sb"
elseif PrevAnim == "runtrans_sb" or PrevAnim == "run_b" or PrevAnim == "runnoblend_b"
then
return "runnoblend_b"
else
return "run_b"
end
EndScript
End

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; TransitionState = TRANS_SwordToBow_Moving
; Animation = DrawBow
; AnimationName = RUElfWar_RUNT
; AnimationMode = ONCE
; End
;
; BeginScript
; CurDrawableAllowToContinue()
; EndScript
; End
;
; TransitionState = TRANS_BowToSword_Moving
; Animation = DrawSword
; AnimationName = RUElfWar_RUNC
; AnimationMode = ONCE
; End
;
; BeginScript
; CurDrawableAllowToContinue()
; EndScript
; End
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;-----------------------------------------------------------------------------------<<<<<<<<<<<<<<<<<<<<<<<<<<<

AnimationState = CONTINUOUS_FIRE_MEAN ;;;;;;;;;HACK TO STOP JITTERS
Animation = HangFrameWhileCoasting
AnimationName = RUElfWar_ATKA2
AnimationMode = MANUAL
AnimationBlendTime = 0
End
Flags = START_FRAME_LAST

BeginScript
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("ARROWNOCK")
if CurDrawablePrevAnimationState() == "STATE_Firing" then CurDrawableAllowToContinue() end
EndScript
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
;;;; VERY IMPORTANT ARCHER INFORMATION
;;;; THIS WILL STOP THE JITTERS, AND BEST
;;;; YET, IT'S A COMPLETE HACK! Just look above.
;;;; We say that if we get into this state
;;;; from firing, just continue to fire. DONE.
;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
End

AnimationState = CONTINUOUS_FIRE_SLOW
StateName = Ready_Bow
Animation = PutAwayArrow
AnimationName = RUElfWar_ATKA3
AnimationMode = ONCE
End

BeginScript
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("ARROWNOCK")
EndScript
End
;;;--------------------------------------------------------------------------------------<<<<<<<<<<<<<<<<<<<<<<<

AnimationState = EMOTION_UNCONTROLLABLY_AFRAID WEAPONSET_TOGGLE_1
StateName = STATE_Emotion_Sword
Animation = Sword
AnimationName = RUElfWar_FERS
AnimationMode = ONCE
End
Animation = Sword2
AnimationName = RUElfWar_FERS
AnimationMode = ONCE
End
Flags = MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
BeginScript
PrevState = CurDrawablePrevAnimationState()
CurDrawableHideSubObject("arrow")
CurDrawableHideSubObject("arrownock")

if PrevState == "STATE_Emotion_Bow"
then
CurDrawableAllowToContinue()
if( CurDrawablePrevAnimFraction() > .89 )
then
CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")
end
end
EndScript
End
AnimationState = EMOTION_UNCONTROLLABLY_AFRAID
StateName = STATE_Emotion_Bow
Animation = Bow
AnimationName = RUElfWar_FERB
AnimationMode = ONCE
AnimationBlendTime = 15
End
Animation = Bow2
AnimationName = RUElfWar_FERB
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
BeginScript
PrevState = CurDrawablePrevAnimationState()
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")

if PrevState == "STATE_Emotion_Sword"
then
CurDrawableAllowToContinue()
if( CurDrawablePrevAnimFraction() > .89 )
then
CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")
end
end
EndScript
End


; -------- Alert ------- ;

AnimationState = EMOTION_ALERT WEAPONSET_TOGGLE_1
StateName = Ready_Sword

Animation = Alert_1
AnimationName = RUElfWar_IDLST1
AnimationMode = LOOP
End

BeginScript
PrevAnim = CurDrawablePrevAnimation()
Prev = CurDrawablePrevAnimationState()
CurDrawableHideSubObject("ArrowNock")
CurDrawableHideSubObject("arrow")
if Prev == "Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_BR_Sword") end
if Prev == "Selected_Sword" then CurDrawableSetTransitionAnimState("TRANS_SR_Sword") end
if Prev == "Selected_Bow" or Prev == "Moving_Bow" or Prev == "Ready_Bow" or Prev == "Bored_Bow" or PrevAnim == "WantSword"
then
CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")
end
EndScript
End
AnimationState = ENGAGED WEAPONSET_TOGGLE_1
StateName = Ready_Sword

Animation = Alert_1
AnimationName = RUElfWar_IDLST1
AnimationMode = LOOP
End

BeginScript
PrevAnim = CurDrawablePrevAnimation()
Prev = CurDrawablePrevAnimationState()
CurDrawableHideSubObject("ArrowNock")
CurDrawableHideSubObject("arrow")
if Prev == "Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_BR_Sword") end
if Prev == "Selected_Sword" then CurDrawableSetTransitionAnimState("TRANS_SR_Sword") end
if Prev == "Selected_Bow" or Prev == "Moving_Bow" or Prev == "Ready_Bow" or Prev == "Bored_Bow" or PrevAnim == "WantSword"
then
CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")
end
EndScript
End
AnimationState = ATTACKING WEAPONSET_TOGGLE_1
StateName = Ready_Sword

Animation = Alert_1
AnimationName = RUElfWar_IDLST1
AnimationMode = LOOP
End

BeginScript
PrevAnim = CurDrawablePrevAnimation()
Prev = CurDrawablePrevAnimationState()
CurDrawableHideSubObject("ArrowNock")
CurDrawableHideSubObject("arrow")
if Prev == "Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_BR_Sword") end
if Prev == "Selected_Sword" then CurDrawableSetTransitionAnimState("TRANS_SR_Sword") end
if Prev == "Selected_Bow" or Prev == "Moving_Bow" or Prev == "Ready_Bow" or Prev == "Bored_Bow" or PrevAnim == "WantSword"
then
CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")
end
EndScript
End

AnimationState = EMOTION_ALERT
StateName = Ready_Bow

Animation = IDLB
AnimationName = RUElfWar_IDLB
AnimationMode = LOOP
End

BeginScript
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
PrevAnim = CurDrawablePrevAnimation()
Prev = CurDrawablePrevAnimationState()
if Prev == "Bored_Bow" then CurDrawableSetTransitionAnimState("TRANS_BR_Bow") end
if Prev == "Selected_Bow" then CurDrawableSetTransitionAnimState("TRANS_SR_Bow") end
if Prev == "Selected_Sword" or Prev == "Moving_Sword" or Prev == "Ready_Sword" or Prev == "Bored_Sword" or PrevAnim == "WantBow"
then
CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")
end
EndScript
End
AnimationState = ENGAGED
StateName = Ready_Bow

Animation = IDLB
AnimationName = RUElfWar_IDLB
AnimationMode = LOOP
End

BeginScript
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
PrevAnim = CurDrawablePrevAnimation()
Prev = CurDrawablePrevAnimationState()
if Prev == "Bored_Bow" then CurDrawableSetTransitionAnimState("TRANS_BR_Bow") end
if Prev == "Selected_Bow" then CurDrawableSetTransitionAnimState("TRANS_SR_Bow") end
if Prev == "Selected_Sword" or Prev == "Moving_Sword" or Prev == "Ready_Sword" or Prev == "Bored_Sword" or PrevAnim == "WantBow"
then
CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")
end
EndScript
End
AnimationState = ATTACKING
StateName = Ready_Bow

Animation = IDLB
AnimationName = RUElfWar_IDLB
AnimationMode = LOOP
End

BeginScript
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
PrevAnim = CurDrawablePrevAnimation()
Prev = CurDrawablePrevAnimationState()
if Prev == "Bored_Bow" then CurDrawableSetTransitionAnimState("TRANS_BR_Bow") end
if Prev == "Selected_Bow" then CurDrawableSetTransitionAnimState("TRANS_SR_Bow") end
if Prev == "Selected_Sword" or Prev == "Moving_Sword" or Prev == "Ready_Sword" or Prev == "Bored_Sword" or PrevAnim == "WantBow"
then
CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")
end
EndScript
End



;;------------ EMOTIONS ------------------------------------------------------------------
;;======= AFRAID

AnimationState = EMOTION_AFRAID WEAPONSET_TOGGLE_1
StateName = STATE_Emotion_Sword
Animation = Sword
AnimationName = RUElfWar_FERS
AnimationMode = ONCE
End
Animation = Sword2
AnimationName = RUElfWar_FERS
AnimationMode = ONCE
End
Flags = MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
BeginScript
PrevState = CurDrawablePrevAnimationState()
CurDrawableHideSubObject("arrow")
CurDrawableHideSubObject("arrownock")

if PrevState == "STATE_Emotion_Bow"
then
CurDrawableAllowToContinue()
if( CurDrawablePrevAnimFraction() > .89 )
then
CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")
end
end
EndScript
End
AnimationState = EMOTION_AFRAID
StateName = STATE_Emotion_Bow
Animation = Bow
AnimationName = RUElfWar_FERB
AnimationMode = ONCE
AnimationBlendTime = 15
End
Animation = Bow2
AnimationName = RUElfWar_FERB
AnimationMode = ONCE
AnimationBlendTime = 15
End
Flags = MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
BeginScript
PrevState = CurDrawablePrevAnimationState()
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")

if PrevState == "STATE_Emotion_Sword"
then
CurDrawableAllowToContinue()
if( CurDrawablePrevAnimFraction() > .89 )
then
CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")
end
end
EndScript
End

;;====== CELEBRATING

AnimationState = EMOTION_CELEBRATING WEAPONSET_TOGGLE_1
StateName = STATE_Emotion_Sword
Animation = Sword
AnimationName = RUElfWar_CHRST2
AnimationMode = ONCE
End
Animation = Sword2
AnimationName = RUElfWar_CHRST2
AnimationMode = ONCE
End
Flags = MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
BeginScript
PrevState = CurDrawablePrevAnimationState()
CurDrawableHideSubObject("arrow")
CurDrawableHideSubObject("arrownock")

if PrevState == "STATE_Emotion_Bow"
then
CurDrawableAllowToContinue()
if( CurDrawablePrevAnimFraction() > .89 )
then
CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")
end
elseif PrevState == "STATE_Emotion_Sword"
then
CurDrawableAllowToContinue()
elseif PrevState == "Selected_Sword"
then
CurDrawableSetTransitionAnimState("TRANS_SR_Sword")
elseif PrevState == "Bored_Sword"
then
CurDrawableSetTransitionAnimState("TRANS_BR_Sword")
end
EndScript
End
AnimationState = EMOTION_CELEBRATING
StateName = STATE_Emotion_Bow
Animation = Bow
AnimationName = RUElfWar_CHRB
AnimationMode = ONCE
End
Animation = Bow2
AnimationName = RUElfWar_CHRB
AnimationMode = ONCE
End
Flags = MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
BeginScript
PrevState = CurDrawablePrevAnimationState()
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")

if PrevState == "STATE_Emotion_Sword"
then
CurDrawableAllowToContinue()
if( CurDrawablePrevAnimFraction() > .89 )
then
CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")
end
elseif PrevState == "STATE_Emotion_Bow"
then
CurDrawableAllowToContinue()
elseif PrevState == "Selected_Bow"
then
CurDrawableSetTransitionAnimState("TRANS_SR_Bow")
; elseif PrevState == "Bored_Bow"
; then
; CurDrawableSetTransitionAnimState("TRANS_BR_Bow")
end
EndScript
End

;;====== TAUNTING

AnimationState = EMOTION_TAUNTING WEAPONSET_TOGGLE_1
StateName = STATE_Emotion_Sword
Animation = Sword
AnimationName = RUElfWar_TNTSV1
AnimationMode = ONCE
End
Animation = Sword2
AnimationName = RUElfWar_TNTSV1
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE ;MAINTAIN_FRAME_ACROSS_STATES
BeginScript
PrevState = CurDrawablePrevAnimationState()
CurDrawableHideSubObject("arrow")
CurDrawableHideSubObject("arrownock")

if PrevState == "STATE_Emotion_Bow"
then
CurDrawableAllowToContinue()
if( CurDrawablePrevAnimFraction() > .89 )
then
CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")
end
elseif PrevState == "STATE_Emotion_Sword"
then
CurDrawableAllowToContinue()
elseif PrevState == "Selected_Sword"
then
CurDrawableSetTransitionAnimState("TRANS_SR_Sword")
elseif PrevState == "Bored_Sword"
then
CurDrawableSetTransitionAnimState("TRANS_BR_Sword")
end
EndScript
End
AnimationState = EMOTION_TAUNTING
StateName = STATE_Emotion_Bow
Animation = Bow1
AnimationName = RUElfWar_TNTB
AnimationMode = ONCE
End
Animation = Bow2
AnimationName = RUElfWar_TNTB ; RUElfWar_TNTBX anim does not exist
AnimationMode = ONCE
End
Flags = RESTART_ANIM_WHEN_COMPLETE ;MAINTAIN_FRAME_ACROSS_STATES
BeginScript
PrevState = CurDrawablePrevAnimationState()
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")

if PrevState == "STATE_Emotion_Sword"
then
CurDrawableAllowToContinue()
if( CurDrawablePrevAnimFraction() > .89 )
then
CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")
end
elseif PrevState == "STATE_Emotion_Bow"
then
CurDrawableAllowToContinue()
elseif PrevState == "Selected_Bow"
then
CurDrawableSetTransitionAnimState("TRANS_SR_Bow")
elseif PrevState == "Bored_Bow"
then
CurDrawableSetTransitionAnimState("TRANS_BR_Bow")
end
EndScript
End

;;====== POINTING

AnimationState = EMOTION_POINTING WEAPONSET_TOGGLE_1
StateName = STATE_Emotion_Sword
Animation = Sword
AnimationName = RUElfWar_PNTB
AnimationMode = ONCE
End
Animation = Sword2
AnimationName = RUElfWar_PNTB
AnimationMode = ONCE
End
Flags = MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
BeginScript
PrevState = CurDrawablePrevAnimationState()
CurDrawableHideSubObject("arrow")
CurDrawableHideSubObject("arrownock")

if PrevState == "STATE_Emotion_Bow"
then
CurDrawableAllowToContinue()
if( CurDrawablePrevAnimFraction() > .89 )
then
CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")
end
elseif PrevState == "STATE_Emotion_Sword"
then
CurDrawableAllowToContinue()
elseif PrevState == "Selected_Sword"
then
CurDrawableSetTransitionAnimState("TRANS_SR_Sword")
elseif PrevState == "Bored_Sword"
then
CurDrawableSetTransitionAnimState("TRANS_BR_Sword")
end
EndScript
End
AnimationState = EMOTION_POINTING
StateName = STATE_Emotion_Bow
Animation = Bow
AnimationName = RUElfWar_PNTA
AnimationMode = ONCE
End
Animation = Bow2
AnimationName = RUElfWar_PNTA
AnimationMode = ONCE
End
Flags = MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
BeginScript
PrevState = CurDrawablePrevAnimationState()
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")

if PrevState == "STATE_Emotion_Sword"
then
CurDrawableAllowToContinue()
if( CurDrawablePrevAnimFraction() > .89 )
then
CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")
end
elseif PrevState == "STATE_Emotion_Bow"
then
CurDrawableAllowToContinue()
elseif PrevState == "Selected_Bow"
then
CurDrawableSetTransitionAnimState("TRANS_SR_Bow")
elseif PrevState == "Bored_Bow"
then
CurDrawableSetTransitionAnimState("TRANS_BR_Bow")
end
EndScript
End

; ------ Selected ------ ;

AnimationState = SELECTED WEAPONSET_TOGGLE_1
StateName = Selected_Sword

Animation = ATNA
AnimationName = RUElfWar_ATNS
AnimationMode = LOOP
End

BeginScript
CurDrawableHideSubObject("ARROW")
CurDrawableHideSubObject("ARROWNOCK")

PrevAnim = CurDrawablePrevAnimation()
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Emotion_Bow" or Prev == "STATE_Emotion_Sword" then CurDrawableAllowToContinue() end
if Prev == "Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_BS_Sword") end
if Prev == "Ready_Sword" then CurDrawableSetTransitionAnimState("TRANS_RS_Sword") end
if Prev == "Selected_Bow" or Prev == "Moving_Bow" or Prev == "Ready_Bow" or Prev == "Bored_Bow" or PrevAnim == "WantSword"
then
CurDrawableSetTransitionAnimState("TRANS_BowToSword_Selected")
end

EndScript
End

AnimationState = SELECTED
StateName = Selected_Bow

Animation = ATNE
AnimationName = RUElfWar_ATNE
AnimationMode = LOOP
End

BeginScript
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
PrevAnim = CurDrawablePrevAnimation()
Prev = CurDrawablePrevAnimationState()
if Prev == "STATE_Emotion_Bow" or Prev == "STATE_Emotion_Sword" then CurDrawableAllowToContinue() end
if Prev == "Bored_Bow" then CurDrawableSetTransitionAnimState("TRANS_BS_Bow") end
if Prev == "Ready_Bow" then CurDrawableSetTransitionAnimState("TRANS_RS_Bow") end
if Prev == "Selected_Sword" or Prev == "Moving_Sword" or Prev == "Ready_Sword" or Prev == "Bored_Sword" or PrevAnim == "WantBow"
then
CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Selected")
end
EndScript
End


; --------- Hit Reactions ---------- ;

AnimationState = HIT_REACTION HIT_LEVEL_1 WEAPONSET_TOGGLE_1
StateName = Bored_Sword
Animation = Hit_Level_1_a
AnimationName = RUElfWar_HITE
AnimationMode = ONCE
End
End

AnimationState = HIT_REACTION HIT_LEVEL_1
StateName = Bored_Bow
Animation = Hit_Level_1_a
AnimationName = RUElfWar_HITB
AnimationMode = ONCE
AnimationSpeedFactorRange = .9 .9
End
End


; ------- Bored -------- ;

AnimationState = WEAPONSET_TOGGLE_1
StateName = Bored_Sword

Animation = Idle_Sword1
AnimationName = RUElfWar_IDLG
AnimationMode = ONCE
End
Animation = Idle_Sword2
AnimationName = RUElfWar_IDLCT1
AnimationMode = ONCE
End
Animation = Idle_Sword3
AnimationName = RUElfWar_IDLCT3
AnimationMode = ONCE
End
Animation = IdleNoFidget
AnimationName = RUElfWar_IDLF
AnimationMode = ONCE
AnimationPriority = 20
End
Animation = IdleNoFidget2
AnimationName = RUElfWar_IDLF
AnimationMode = ONCE
AnimationPriority = 0
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
CurDrawableHideSubObject("ARROW")
CurDrawableHideSubObject("ARROWNOCK")

PrevAnim = CurDrawablePrevAnimation()
Prev = CurDrawablePrevAnimationState()
if Prev == "TRANS_SB_Sword" or Prev == "TRANS_RB_Sword" then return "IdleNoFidget" end
if Prev == "Selected_Sword" then CurDrawableSetTransitionAnimState("TRANS_SB_Sword") end
if Prev == "Ready_Sword" then CurDrawableSetTransitionAnimState("TRANS_RB_Sword") end
if Prev == "Selected_Bow" or Prev == "Moving_Bow" or Prev == "Ready_Bow" or Prev == "Bored_Bow" or PrevAnim == "WantSword"
then
CurDrawableSetTransitionAnimState("TRANS_BowToSword_Selected")
end
EndScript
End

IdleAnimationState
StateName = Bored_Bow

Animation = IdleBowB
AnimationName = RUElfWar_IDLDX1
AnimationMode = ONCE
End
Animation = IdleBowD
AnimationName = RUElfWar_IDLD
AnimationMode = ONCE
End
Animation = IdleNoFidget
AnimationName = RUElfWar_IDLE
AnimationMode = ONCE
AnimationPriority = 20
End
Animation = IdleNoFidget2
AnimationName = RUElfWar_IDLE
AnimationMode = ONCE
AnimationPriority = 10
End
Flags = RESTART_ANIM_WHEN_COMPLETE
BeginScript
CurDrawableShowSubObject("arrow")
CurDrawableShowSubObject("arrownock")
PrevAnim = CurDrawablePrevAnimation()
Prev = CurDrawablePrevAnimationState()
if Prev == "TRANS_SB_Bow" or Prev == "TRANS_RB_Bow" then return "IdleNoFidget" end
if Prev == "Selected_Bow" then CurDrawableSetTransitionAnimState("TRANS_SB_Bow") end
if Prev == "Ready_Bow" then CurDrawableSetTransitionAnimState("TRANS_RB_Bow") end
if Prev == "Selected_Sword" or Prev == "Moving_Sword" or Prev == "Ready_Sword" or Prev == "Bored_Sword" or PrevAnim == "WantBow"
then
CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Selected")
end
EndScript
End


;----------------- Bow Transitions -------------------------;

TransitionState = TRANS_BS_Bow
Animation = ATND
AnimationName = RUElfWar_ATND
AnimationMode = ONCE
AnimationBlendTime = 10
End
End

TransitionState = TRANS_SR_Bow
Animation = ATNE
AnimationName = RUElfWar_ATNF
AnimationMode = ONCE
End
End

TransitionState = TRANS_SB_Bow
Animation = ATND
AnimationName = RUElfWar_ATND
AnimationMode = ONCE_BACKWARDS
End
Flags = START_FRAME_LAST
End

TransitionState = TRANS_RS_Bow
Animation = ATNF
AnimationName = RUElfWar_ATNF
AnimationMode = ONCE_BACKWARDS
End
Flags = START_FRAME_LAST
End

TransitionState = TRANS_BR_Bow
Animation = IDLB
AnimationName = RUElfWar_IDLB
AnimationMode = ONCE
AnimationBlendTime = 20
End
End

TransitionState = TRANS_RB_Bow
Animation = IDLD
AnimationName = RUElfWar_IDLD
AnimationMode = ONCE
AnimationBlendTime = 20
End
End

;----------------- Sword Transitions -------------------------;

TransitionState = TRANS_BS_Sword
Animation = ATNA
AnimationName = RUElfWar_ATNA
AnimationMode = ONCE
End
Animation = ATNAX1
AnimationName = RUElfWar_ATNX1
AnimationMode = ONCE
End
End

TransitionState = TRANS_SR_Sword
Animation = ATNC
AnimationName = RUElfWar_ATNC
AnimationMode = ONCE
End
End

TransitionState = TRANS_SB_Sword
Animation = ATNA
AnimationName = RUElfWar_ATNA
AnimationMode = ONCE_BACKWARDS
End
Flags = START_FRAME_LAST
End

TransitionState = TRANS_RS_Sword
Animation = ATNC
AnimationName = RUElfWar_ATNC
AnimationMode = ONCE_BACKWARDS
End
Flags = START_FRAME_LAST
End

TransitionState = TRANS_BR_Sword
Animation = ATNS
AnimationName = RUElfWar_ATNS
AnimationMode = ONCE
AnimationBlendTime = 20
End
End

TransitionState = TRANS_RB_Sword
Animation = IDLG
AnimationName = RUElfWar_IDLG
AnimationMode = ONCE
AnimationBlendTime = 20
End
End


;-------------- Weapon Change Transitions --------------------------;

TransitionState = TRANS_BowToSword_Ready
Animation = DrawSwords
AnimationName = RUElfWar_STHA
AnimationMode = ONCE
End
End

TransitionState = TRANS_SwordToBow_Ready
Animation = DrawBow
AnimationName = RUElfWar_STHB
AnimationMode = ONCE
End
End

TransitionState = TRANS_BowToSword_Selected
Animation = DrawSwords
AnimationName = RUElfWar_STHC
AnimationMode = ONCE
End
End

TransitionState = TRANS_SwordToBow_Selected
Animation = DrawBow
AnimationName = RUElfWar_STHD
AnimationMode = ONCE
End
End
;;------------------------------------------------------------------------------------------------------------
End

; ***DESIGN parameters ***
Side = Gondor
EditorSorting = UNIT
ThreatLevel = 1.0
ThingClass = HORDE_UNIT
CommandPoints = 4

TransportSlotCount = 1
WeaponSet
Conditions = None
Weapon = PRIMARY ElvenVanyarBow
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End


;bow upgrade
;WeaponSet
; Conditions = PLAYER_UPGRADE
; Weapon = PRIMARY ElvenVanyarBow ; RohanElvenBowFireArrow
; AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
;End


WeaponSet
Conditions = WEAPONSET_TOGGLE_1 ; CONTESTING_BUILDING
Weapon = PRIMARY ElvenVanyarSword
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
; sword upgrade
;WeaponSet
; Conditions = PLAYER_UPGRADE WEAPONSET_TOGGLE_1 CONTESTING_BUILDING
; Weapon = PRIMARY ElvenVanyarSword
;AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
;End

ArmorSet
Conditions = None
Armor = SpecialistArmor
DamageFX = NormalDamageFX
End

ArmorSet
Conditions = PLAYER_UPGRADE
Armor = SpecialistHeavyArmor
DamageFX = NormalDamageFX
End

VisionRange = ROHAN_ELVENWARRIOR_VISION_RANGE
ShroudClearingRange = SHROUD_CLEAR_STANDARD

BountyValue = ROHAN_ELVENWARRIOR_BOUNTY_VALUE
DisplayName = OBJECT:RohanElvenWarrior
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles

CrushRevengeWeapon = RangedInfantryCrushRevenge ; Now has porcupine power in sword stance though
CommandSet = ElvenVanyarCommandSet



; *** AUDIO Parameters ***;

VoiceAttack = ElvenWarriorVoiceAttack
VoiceAttackAir = ElvenWarriorVoiceAttackBow
VoiceAttackCharge = ElvenWarriorVoiceAttackCharge
VoiceAttackStructure = ElvenWarriorVoiceAttackStructure ; ElvenWarriorVoiceAttackBuilding not recorded
VoiceAttackMachine = ElvenWarriorVoiceAttackStructure ; ElvenWarriorVoiceAttackBuilding not recorded
VoiceCreated = ElvenWarriorVoiceSalute
VoiceFullyCreated = ElvenWarriorVoiceSalute
VoiceMove = ElvenWarriorVoiceMove
VoiceMoveToCamp = ElvenWarriorVoiceMoveCamp
VoiceMoveWhileAttacking = ElvenWarriorVoiceDisengage
VoicePriority = 41
VoiceRetreatToCastle = ElvenWarriorVoiceRetreat
VoiceSelect = ElvenWarriorVoiceSelect
VoiceSelect2 = ElvenWarriorVoiceSelect2
VoiceSelectBattle = ElvenWarriorVoiceSelectBattle
VoiceGuard = ElvenWarriorVoiceMove

UnitSpecificSounds
VoiceGarrison = ElvenWarriorVoiceGarrison
VoicePrimaryWeaponMode = ElvenWarriorVoiceModeBow
VoiceSecondaryWeaponMode = ElvenWarriorVoiceModeSword
End

EvaEventDamagedOwner = UnitUnderAttack ;Eva event to trigger when unit is damaged

Behavior = LargeGroupAudioUpdate ModuleTag_LGAU ; Tie into LargeGroupAudio system
Key = Elf Unit Infantry Elf_Warrior
End

ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
MaxUpdateRangeCap = 800
AnimationSound = Sound:ArrowDrawBow Animation:RUElfWar_SKL.RUElfWar_ATKA1 Frames:6
AnimationSound = Sound:ArrowDrawBow Animation:RUElfWar_SKL.RUElfWar_ATKA2 Frames:18

AnimationSound = Sound:SwordShingClean1ForHordes Animation:RUElfWar_SKL.RUElfWar_STHA Frames:24
AnimationSound = Sound:SwordIntoScabbard1ForHordes Animation:RUElfWar_SKL.RUElfWar_STHB Frames:9
AnimationSound = Sound:WeaponSwitchBowForHordes Animation:RUElfWar_SKL.RUElfWar_STHB Frames:15

AnimationSound = Sound:SwordShingClean1ForHordes Animation:RUElfWar_SKL.RUElfWar_STHC Frames:20
AnimationSound = Sound:SwordIntoScabbard1ForHordes Animation:RUElfWar_SKL.RUElfWar_STHD Frames:5
AnimationSound = Sound:WeaponSwitchBowForHordes Animation:RUElfWar_SKL.RUElfWar_STHD Frames:8

AnimationSound = Sound:SwordShingClean1ForHordes Animation:RUElfWar_SKL.RUElfWar_RUNC Frames:14
AnimationSound = Sound:SwordIntoScabbard1ForHordes Animation:RUElfWar_SKL.RUElfWar_RUNT Frames:4
AnimationSound = Sound:WeaponSwitchBowForHordes Animation:RUElfWar_SKL.RUElfWar_RUNT Frames:16

AnimationSound = Sound:BodyFallSoldier Animation:RUElfWar_SKL.RUElfWar_LNDA Frames:9
AnimationSound = Sound:BodyFallSoldier Animation:RUElfWar_SKL.RUElfWar_LNDB Frames:1

AnimationSound = Sound:BodyFallGenericNoArmor Animation:RUElfWar_SKL.RUElfWar_DIEB Frames:82
AnimationSound = Sound:BodyFallSoldier Animation:RUElfWar_SKL.RUElfWar_DIEBV5 Frames:25
AnimationSound = Sound:BodyFallSoldier Animation:RUElfWar_SKL.RUElfWar_DIESV4 Frames:26
AnimationSound = Sound:BodyFallGenericNoArmor Animation:RUElfWar_SKL.RUElfWar_DIESV5 Frames:100
End

;------------------ AnimationAudio ---- ElvenWarriorVoice WeaponModes ---------------
;
; This was the old hookup for ElvenWarriorVoice switch bow or sword; now it's in CommandButton.INI
;
;ClientBehavior = AnimationSoundClientBehavior ModuleTag_AnimAudioBehavior
; MaxUpdateRangeCap = 800
; AnimationSound = Sound: ElvenWarriorVoiceModeSword Animation: RUElfWar_STHA Frames: 0
; AnimationSound = Sound: ElvenWarriorVoiceModeBow Animation: RUElfWar_STHB Frames: 0
; AnimationSound = Sound: ElvenWarriorVoiceModeSword Animation: RUElfWar_RUNC Frames: 0
; AnimationSound = Sound: ElvenWarriorVoiceModeBow Animation: RUElfWar_RUNT Frames: 0
;End


; *** ENGINEERING Parameters ***

RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS INFANTRY SCORE THROWN_OBJECT PATH_THROUGH_EACH_OTHER ARCHER ATTACK_NEEDS_LINE_OF_SIGHT GRAB_AND_DROP

Body = PorcupineFormationBodyModule ModuleTag_Porcupine
CheerRadius = EMOTION_CHEER_RADIUS
MaxHealth = GONDOR_ELVEN_VANYAR_HEALTH ;BALANCE RohanElvenWarrior
MaxHealthDamaged = GONDOR_ELVEN_VANYAR_HEALTH_DAMAGED
CrushDamageWeaponTemplate = ElvenWarriorPorcupineDamage ; Only fires at the crusher if the horde says it is on.
End

; Fire arrow upgrade
Behavior = WeaponSetUpgrade ModuleTag_WeaponSetUpgradeTag
TriggeredBy = Upgrade_RohanFireArrows
CustomAnimAndDu

Edited by ched, 21 December 2005 - 10:40 PM.


#5 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 21 December 2005 - 10:09 PM

Couldn't you use the code option when posting code.. and maybe attach long codes as .txt file? That would be much easier ;)

And what about the commandbutton.ini? We'd maybe need that one too, to check on the "Command_ToggleVanyarWeapon", maybe the problem is there...

Edited by Dark Lord of the Sith, 21 December 2005 - 10:09 PM.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#6 Artifice

Artifice

    title available

  • Members
  • 382 posts
  • Location:Texas

Posted 21 December 2005 - 11:57 PM

Why don't you just use the toggleelvenwarriorweapon commandbutton? Also, did you change the names of the units in the horde?

Edited by Prince Imrahil, 21 December 2005 - 11:58 PM.


#7 Mullers_11

Mullers_11

    Onlooker

  • Project Team
  • 806 posts
  • Location:England
  • Projects:Visions, The Four Ages
  •  Not active

Posted 22 December 2005 - 12:03 PM

Could it be something to do with the weapon.ini also?

Retired


#8 Ar-Zontar

Ar-Zontar
  • Members
  • 40 posts
  • Location:Rockwood, ON

Posted 22 December 2005 - 02:11 PM

Hi Guys - sorry for the hideous mnner in which I posted the code ... I will attach the different INI in text files so you can see ... I guess if someone is willing to help the least I can do is make it easy on the eyes (sorry Ched, I got lazy).

I did try using the toggleelvenwarriorweapon, but same deal - no weapon change and then the commandset disappears. I did see that I think I've missed the reference in the commandbutton .... that might be it.

Question - I think I've been confused because of all the horders and double hordes and swordhordes etc.... Can anyone explain what the bare minimum would be to get the summoned Elves to appear (in terms of unit and horde code)?

My guess is the unit description, and then a single horde reference would be all I would need for the Elves with 2 weapons? What are the double hordes and swordhordes used for in game (or are they?).

Following that, which commandset actually controls a horde? Do you have to have the unit commandset as well as the horde commandset, or does the horde simply refer to the horde commandset to get it's buttons?

Thanks for checking this, and I hope I get an X-Mas boost with getting over this hump.

Thanx to all!

Attached Files



#9 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 22 December 2005 - 08:01 PM

If you only want a toggle you only need the main horde, everything else is for other formations and/or double or mixed hordes.

As far as I can see from what you said (sorry, not enough time to look through all the inis :p ) you press the button and then your horde is split up leaving you with nothing but the five contained units.
And that is why the commandset "disappears" ==> it's not the one of the horde but the one of the single units.

So you'd mainly have to check on the horde code (could be a problem with references in other inis too... but I would have a closer look on the horde...)

Edited by Dark Lord of the Sith, 22 December 2005 - 08:02 PM.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users