Jump to content


Photo

where can i find enum? arrow stuff completed lol


  • Please log in to reply
44 replies to this topic

#1 Chocolate Star

Chocolate Star

    Count

  • Project Team
  • 431 posts
  • Projects:BFME II: Passion & From Book 2 Game

Posted 21 April 2012 - 12:50 AM

I have a problem with my Arnor archers...

I upgrade the fire arrow and when he shoots it is normal arrows and when the upgrade is finished it doesn't show on the end of the arrows.

Can someone please see whats wrong...

With experience I also can't see them level up, I put them with GondorArcher in the experiencelevels.ini but can't see them.

This is really frustrating, I want those fire arrows seeable. grrrr

Attached Files


Edited by marsbar, 03 May 2012 - 12:04 AM.


#2 Lauri

Lauri

    Old man Lauri

  • Hosted
  • 10,438 posts
  • Location:Norway
  • Projects:The 4th Age
  •  The very worst T3A Team Chamber Member

Posted 21 April 2012 - 01:15 AM

Did you put your ArnorArcherHorde in with the GondorArcherHorde in experiencelevels.ini aswell?

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#3 Chocolate Star

Chocolate Star

    Count

  • Project Team
  • 431 posts
  • Projects:BFME II: Passion & From Book 2 Game

Posted 21 April 2012 - 11:22 AM

Did you put your ArnorArcherHorde in with the GondorArcherHorde in experiencelevels.ini aswell?


yes, i uploaded the .ini's... here is the line.

#define GOOD_TROOPS GondorTowerShieldGuard GondorTowerShieldGuardHorde GondorTowerShieldGuardHordePorcupine GondorInfantryBanner ElvenMithlondSentry ElvenMithlondSentryHorde ElvenBanner ElvenLorienWarrior ElvenLorienWarriorHorde ElvenLorienArcher ElvenLorienArcherHorde RohanHobbit RohanArcher RohanArcherHorde RohanArcherHordeSkirmishFormation RohanPeasant RohanPeasant1 RohanPeasant2 RohanPeasant3 RohanPeasant4 RohanPeasantHorde GondorFighter GondorFighterHorde GondorFighterHordeBlock GondorArcher GondorArcherHorde ArnorArcher ArnorArcherHorde RohanBanner DwarvenGuardian DwarvenGuardianHorde DwarvenBanner DwarvenAxeThrower DwarvenAxeThrowerHorde DwarvenPhalanx DwarvenPhalanxHorde


Main problem is why the fire arrows wont work and show up on the arrows wtf!


--- EXPERIENCE LEVELS FIXED ---

I had a "minor" spelling mistake saying "Anor"... lol, but I'm pretty sure I have done everything for the fire arrows, They almost have exactly the same coding as the Gondor Archers, yet the Arnor Archers when they upgrade to fire arrows it doesn't show or work :\

heres the weapon ini, all I've done is replace Gondor with Arnor and made them a little more damage powerful since they cost 50 more.

Weapon ArnorArcherBow
AttackRange = GONDOR_ARCHER_RANGE

RangeBonusMinHeight = 10
RangeBonus = 1
RangeBonusPerFoot = 1 ; ;#MULTIPLY( GONDOR_ARCHER_RANGE .01 )

LeechRangeWeapon = Yes
WeaponSpeed = 321 ; dist/sec
MinWeaponSpeed = 241
MaxWeaponSpeed = 481 ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
FireFX = FX_RohanArcherBowWeapon
ScaleWeaponSpeed = Yes ; Used for lob weapons, scales speed proportional to range
HitPercentage = 100 ;When this weapon is used it will hit exactly 50% of the time.
ScatterRadius = 16.0 ;When this weapon misses it can randomly miss by as much as this distance.

AcceptableAimDelta = 20 ; prevent twitchy reaiming in horde on horde
DelayBetweenShots = 0
PreAttackDelay = GONDOR_ARCHER_BOW_PREATTACKDELAY
PreAttackRandomAmount = 40 ; ;200
PreAttackType = PER_POSITION
FiringDuration = 0

ClipSize = 1
AutoReloadsClip = Yes
AutoReloadWhenIdle = 1
ClipReloadTime = Min:GONDOR_ARCHER_BOW_RELOADTIME_MIN Max:GONDOR_ARCHER_BOW_RELOADTIME_MAX
ContinuousFireOne = 0
ContinuousFireCoast = GONDOR_ARCHER_BOW_RELOADTIME_MAX

AntiAirborneVehicle = Yes
AntiAirborneMonster = Yes
HitPassengerPercentage = 30%
CanBeDodged = Yes ; Will check for a DodgePercent on the target to have a second chance at failing HitPercent

ProjectileNugget ; Default arrow
ProjectileTemplateName = ArnorArcherArrow
WarheadTemplateName = ArnorArcherBowWarhead
ForbiddenUpgradeNames = Upgrade_GondorFireArrows ;
End
ProjectileNugget ; Fire arrow available through fire upgrade
ProjectileTemplateName = ArnorArcherFireArrow
WarheadTemplateName = ArnorArcherBowFireWarhead
RequiredUpgradeNames = Upgrade_GondorFireArrows ; ;Upgrade_GondorFireArrows
End
End

Weapon ArnorArcherBowBombard
AttackRange = GONDOR_ARCHER_BOMBARD_MAXRANGE
MinimumAttackRange = #SUBTRACT( GONDOR_ARCHER_BOMBARD_MINRANGE 75 )

RangeBonusMinHeight = 10
RangeBonus = 1
RangeBonusPerFoot = 1 ; ;#MULTIPLY( GONDOR_ARCHER_BOMBARD_MAXRANGE .01 )

LeechRangeWeapon = Yes
WeaponSpeed = 321 ; dist/sec
MinWeaponSpeed = 241
MaxWeaponSpeed = 481 ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
FireFX = FX_RohanArcherBowWeapon
ScaleWeaponSpeed = Yes ; Used for lob weapons, scales speed proportional to range
HitPercentage = 0 ; Always miss and get scattered
ScatterRadius = ARCHER_BOMBARD_SCATTER_RADIUS ;When this weapon misses it can randomly miss by as much as this distance.

AcceptableAimDelta = 20 ; prevent twitchy reaiming in horde on horde
DelayBetweenShots = 0
PreAttackDelay = GONDOR_ARCHER_BOW_PREATTACKDELAY
PreAttackRandomAmount = 200
PreAttackType = PER_POSITION
FiringDuration = 0

ClipSize = 1
AutoReloadsClip = Yes
AutoReloadWhenIdle = 1
ClipReloadTime = Min:GONDOR_ARCHER_BOW_RELOADTIME_MIN Max:GONDOR_ARCHER_BOW_RELOADTIME_MAX
ContinuousFireOne = 0
ContinuousFireCoast = GONDOR_ARCHER_BOW_RELOADTIME_MAX

AntiAirborneVehicle = Yes
AntiAirborneMonster = Yes
HitPassengerPercentage = 30%
CanBeDodged = Yes ; Will check for a DodgePercent on the target to have a second chance at failing HitPercent

NoVictimNeeded = Yes ; For use with Bombard
BombardType = Yes

ProjectileNugget ; Default arrow
ProjectileTemplateName = ArnorArcherArrowBombard
WarheadTemplateName = ArnorArcherBowBombardWarhead
ForbiddenUpgradeNames = Upgrade_GondorFireArrows ; ;Upgrade_GondorFireArrows
End
ProjectileNugget ; Fire arrow available through fire upgrade
ProjectileTemplateName = ArnorArcherFireArrowBombard
WarheadTemplateName = ArnorArcherBowBombardFireWarhead
RequiredUpgradeNames = Upgrade_GondorFireArrows ; ;Upgrade_GondorFireArrows
End
End

;----------------------------
Weapon ArnorArcherBowWarhead
ProjectileCollidesWith = ENEMIES NEUTRAL STRUCTURES WALLS
RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR ;ALLIES
HitStoredTarget = Yes ; Always hits initial target.
DamageNugget ; A basic Nugget that just does damage
Damage = 50
Radius = 0.0 ; HitStoredTarget means we hurt the person we launched at. And nobody else. So a miss hurts nobody.
DelayTime = 0
DamageType = PIERCE
DamageFXType = GOOD_ARROW_PIERCE
DeathType = NORMAL
End
End

Weapon ArnorArcherBowBombardWarhead
ProjectileCollidesWith = ENEMIES NEUTRAL STRUCTURES WALLS
RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR ;ALLIES
DamageNugget ; A basic Nugget that just does damage
Damage = 50
Radius = 0.0 ; HitStoredTarget means we hurt the person we launched at. And nobody else. So a miss hurts nobody.
DelayTime = 0
DamageType = PIERCE
DamageFXType = GOOD_ARROW_PIERCE
DeathType = NORMAL
End
End


Weapon ArnorArcherBowFireWarhead
ProjectileCollidesWith = ENEMIES NEUTRAL STRUCTURES WALLS
RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR ;ALLIES
HitStoredTarget = Yes ; Always hits initial target.

DamageNugget ; A basic Nugget that just does damage
Damage = 1
Radius = 0.0 ; HitStoredTarget means we hurt the person we launched at. And nobody else. So a miss hurts nobody.
DamageType = FLAME
DamageFXType = FLAME
DeathType = BURNED
AcceptDamageAdd = No
DamageScalar = 50000% NONE +MINE ; Make sure we one shot kill mines, without risking wasting some poor hero with a torch
End

DamageNugget
Damage = 65
Radius = 0.0 ; HitStoredTarget means we hurt the person we launched at. And nobody else. So a miss hurts nobody.
DelayTime = 0
DamageType = FLAME
DamageFXType = GOOD_ARROW_PIERCE
DeathType = BURNED
AcceptDamageAdd = No
DamageScalar = 25% ALL -STRUCTURE
End

DamageNugget ; A basic Nugget that just does damage
Damage = 50
Radius = 0.0 ; HitStoredTarget means we hurt the person we launched at. And nobody else. So a miss hurts nobody.
DelayTime = 0
DamageType = PIERCE
DamageFXType = GOOD_ARROW_PIERCE
DeathType = NORMAL
End
End

Weapon ArnorArcherBowBombardFireWarhead
ProjectileCollidesWith = ENEMIES NEUTRAL STRUCTURES WALLS
RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR ;ALLIES

DamageNugget ; A basic Nugget that just does damage
Damage = 1
Radius = 0.0 ; HitStoredTarget means we hurt the person we launched at. And nobody else. So a miss hurts nobody.
DamageType = FLAME
DamageFXType = FLAME
DeathType = BURNED
AcceptDamageAdd = No
DamageScalar = 50000% NONE +MINE ; Make sure we one shot kill mines, without risking wasting some poor hero with a torch
End

DamageNugget
Damage = 65
Radius = 0.0 ; HitStoredTarget means we hurt the person we launched at. And nobody else. So a miss hurts nobody.
DelayTime = 0
DamageType = FLAME
DamageFXType = GOOD_ARROW_PIERCE
DeathType = BURNED
AcceptDamageAdd = No
DamageScalar = 25% ALL -STRUCTURE
End

DamageNugget ; A basic Nugget that just does damage
Damage = 50
Radius = 0.0 ; HitStoredTarget means we hurt the person we launched at. And nobody else. So a miss hurts nobody.
DelayTime = 0
DamageType = PIERCE
DamageFXType = GOOD_ARROW_PIERCE
DeathType = NORMAL
End

FireLogicNugget
LogicType = INCREASE_BURN_RATE
Radius = 1.0
Damage = ARCHER_BOMBARD_FIREARROW_BURNRATEINCREASE
End
End


Edited by marsbar, 21 April 2012 - 12:14 PM.


#4 Titan Cronus

Titan Cronus

    Do unto Others...

  • Members
  • 693 posts
  • Location:Ireland
  • Projects:The Battle of the Pelennor Fields Mod.

Posted 21 April 2012 - 03:24 PM

Hey there.

To fix the actual arrow (so the arrow that's fired is on fire) I reckon you need to swap the upgrades in the ProjectileNuggets. I think this is the upgrade your looking for: Upgrade_ArnorFireArrows.
As for the fire arrow tip. Im not sure if it's the archer fire arrow tip but I know that some of the arnor upgrade components are missing, things like fire arrow tips or forged blade glows. It's possible that the fire arrow tip that you want is one of the bits missing from the arnor models.

Good luck.

Battle of the Pelennor Fields

Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.

 

http://www.moddb.com...pelennor-fields


#5 Chocolate Star

Chocolate Star

    Count

  • Project Team
  • 431 posts
  • Projects:BFME II: Passion & From Book 2 Game

Posted 21 April 2012 - 03:50 PM

Hey there.

To fix the actual arrow (so the arrow that's fired is on fire) I reckon you need to swap the upgrades in the ProjectileNuggets. I think this is the upgrade your looking for: Upgrade_ArnorFireArrows.
As for the fire arrow tip. Im not sure if it's the archer fire arrow tip but I know that some of the arnor upgrade components are missing, things like fire arrow tips or forged blade glows. It's possible that the fire arrow tip that you want is one of the bits missing from the arnor models.

Good luck.


Hi thanks for the help.

so your saying I should post the Arnor upgrades and stuff into the inis from rotwk?...

Or make a duplicate Gondor Soldier and just rename the skin to gunumenorean or whatever its called? I will go ingame and replace the gondor archer skin with that of the arnor soldier and see what happens.

Edited by marsbar, 21 April 2012 - 03:51 PM.


#6 Chocolate Star

Chocolate Star

    Count

  • Project Team
  • 431 posts
  • Projects:BFME II: Passion & From Book 2 Game

Posted 21 April 2012 - 03:59 PM

Hi update:

So I changed the gondor skin to the arnor skin...

The Fire Arrows do work when shot, but they don't show up on the end of the arrows when walking around?????? :\

Is it possible there is a problem with the model?

Anyway I can use FX to fix it?

Edited by marsbar, 21 April 2012 - 04:17 PM.


#7 Titan Cronus

Titan Cronus

    Do unto Others...

  • Members
  • 693 posts
  • Location:Ireland
  • Projects:The Battle of the Pelennor Fields Mod.

Posted 21 April 2012 - 05:11 PM

Hey again.

Im glad you got the actual arrow thing fixed. Regards the arrow tip, I reckon that it is indeed something to do with the arrow tip missing from the model. Thats what I was trying to say before, that there some bits missing form some of the Arnor models but I must have failed to get it accross. Im not really that good at explaining things sometimes. I think that in BfMe I, you use FX for arrow tips on some models but I don't think that it works in BfMe II or RotWK as I don't think there is bones to attach the FX to. Im not totally sure about this though as I don't have any way of checking the models but Im sure there are others here on the site that might be able to help you.

I got everything working that I could using code on my arnor models for my mod but its been so long ago now I can't actually remember if that was one of the things I couldn't fix. I'll go check for you in a short while.

Battle of the Pelennor Fields

Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.

 

http://www.moddb.com...pelennor-fields


#8 Chocolate Star

Chocolate Star

    Count

  • Project Team
  • 431 posts
  • Projects:BFME II: Passion & From Book 2 Game

Posted 21 April 2012 - 05:15 PM

Hey again.

Im glad you got the actual arrow thing fixed. Regards the arrow tip, I reckon that it is indeed something to do with the arrow tip missing from the model. Thats what I was trying to say before, that there some bits missing form some of the Arnor models but I must have failed to get it accross. Im not really that good at explaining things sometimes. I think that in BfMe I, you use FX for arrow tips on some models but I don't think that it works in BfMe II or RotWK as I don't think there is bones to attach the FX to. Im not totally sure about this though as I don't have any way of checking the models but Im sure there are others here on the site that might be able to help you.

I got everything working that I could using code on my arnor models for my mod but its been so long ago now I can't actually remember if that was one of the things I couldn't fix. I'll go check for you in a short while.


Ah Ok I understand what you were saying now.... damn EA, always lazy.

#9 Chocolate Star

Chocolate Star

    Count

  • Project Team
  • 431 posts
  • Projects:BFME II: Passion & From Book 2 Game

Posted 21 April 2012 - 05:35 PM

Here is a screenshot of Isildur, I will put him now as the ring hero and put Eowyn back as a hero... made the button myself, perhaps gimp is a better investment than photoshop for me right now lol.

Posted Image

#10 Titan Cronus

Titan Cronus

    Do unto Others...

  • Members
  • 693 posts
  • Location:Ireland
  • Projects:The Battle of the Pelennor Fields Mod.

Posted 21 April 2012 - 06:22 PM

Ahh, trusty ol' gimp. I use gimp all the time.

Yep, it seems like they never got round to putting the arrow tips on the archer model. If someone could tell us if there is a bone at the end of the arrow on this model, then we would know if we could use an FX instead.

Battle of the Pelennor Fields

Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.

 

http://www.moddb.com...pelennor-fields


#11 Chocolate Star

Chocolate Star

    Count

  • Project Team
  • 431 posts
  • Projects:BFME II: Passion & From Book 2 Game

Posted 21 April 2012 - 09:04 PM

well how did RJ-ROTWK do it then? :\

I also get a very strange error with haldirs elves (at the movie)

LINE 1 error ?

ERROR: Could not open include in
data\ini\object\goodfaction\elves\elven\galadhrimwarrior.ini line 1 file
data\ini\object\goodfaction\units\includes\StandardUnitEvaEvents.inc,
parent file
data\ini\object\goodfaction\elves\elven\galadhrimwarrior.ini
14 adresses

; aka Rohan Elven Warrior
Object GaladhrimWarrior
; ***ART Parameters ***

SelectPortrait = UPElven_LorienWarrior

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

;;================== 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 = Elves
EditorSorting = UNIT
ThreatLevel = 1.0
ThingClass = HORDE_UNIT
CommandPoints = 4

TransportSlotCount = TRANSPORTSLOTCOUNT_UNIT
WeaponSet
Conditions = None
Weapon = PRIMARY RohanElvenBow
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
;bow upgrade
WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY RohanElvenBow ; RohanElvenBowFireArrow
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
WeaponSet
Conditions = WEAPONSET_TOGGLE_1 ; CONTESTING_BUILDING
Weapon = PRIMARY ElvenWarriorSword ;GondorRangerSword
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
; sword upgrade
WeaponSet
Conditions = PLAYER_UPGRADE WEAPONSET_TOGGLE_1 CONTESTING_BUILDING
Weapon = PRIMARY ElvenWarriorSword
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:galadhrimWarrior
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles

CrushRevengeWeapon = SuperInfantryCrushRevenge
CommandSet = galadhrimWarriorCommandSet


; *** 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 = ElvenWarriorVoiceSelectMS
VoiceSelectBattle = ElvenWarriorVoiceSelectBattle
VoiceGuard = ElvenWarriorVoiceMove

UnitSpecificSounds
VoiceGarrison = ElvenWarriorVoiceGarrison
VoicePrimaryWeaponMode = ElvenWarriorVoiceModeBow
VoiceSecondaryWeaponMode = ElvenWarriorVoiceModeSword
End

#include "..\includes\StandardUnitEvaEvents.inc"

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 = ActiveBody ModuleTag_02
CheerRadius = EMOTION_CHEER_RADIUS
MaxHealth = ROHAN_ELVENWARRIOR_HEALTH ;BALANCE RohanElvenWarrior
MaxHealthDamaged = ROHAN_ELVENWARRIOR_HEALTH_DAMAGED
;RecoveryTime = ROHAN_ELVENWARRIOR_HEALTH_RECOVERY_TIME
End

; Fire arrow upgrade
Behavior = WeaponSetUpgrade ModuleTag_WeaponSetUpgradeTag
TriggeredBy = ElvenSilverthornArrows
CustomAnimAndDuration = AnimState:USER_4 AnimTime:0 TriggerTime:0 ;set flag forever
End

; Switch arrows being displayed.
Behavior = SubObjectsUpgrade ModuleTag_FireArrowSwapUpgrade
TriggeredBy = ElvenSilverthornArrows
ShowSubObjects = FireArowTip
End

Behavior = WeaponSetUpgrade WeaponSetUpgradeModuleTag
TriggeredBy = Upgrade_ElvenForgedBlades
CustomAnimAndDuration = AnimState:USER_5 AnimTime:0 TriggerTime:0 ;set flag forever
End

Behavior = SubObjectsUpgrade Armor_Upgrade
TriggeredBy = Upgrade_ElvenHeavyArmor
UpgradeTexture = RUElvnWorrior.tga 0 RUElvnWorriorHA.tga
UpgradeTexture = RUElvnWorrior_L.tga 0 RUElvnWorriorHA.tga
RecolorHouse = Yes
End

Behavior = ArmorUpgrade ArmorUpgradeModuleTag
TriggeredBy = Upgrade_ElvenHeavyArmor
End

Behavior = SubObjectsUpgrade ForgedBlades_Upgrade
TriggeredBy = Upgrade_ElvenForgedBlades
ShowSubObjects = Forged_Blade
End

Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS STEALTHED
MoodAttackCheckRate = 500
CanAttackWhileContained = Yes
; HoldGroundCloseRangeDistance = 41
AILuaEventsList = RohanElvenWarriorFunctions
End

LocomotorSet
Locomotor = HumanLocomotor
Condition = SET_NORMAL
Speed = NORMAL_GOOD_FAST_MEMBER_SPEED
End

LocomotorSet
Locomotor = HumanWanderLocomotor
Condition = SET_WANDER
Speed = NORMAL_GOOD_FAST_MEMBER_SPEED
End

LocomotorSet
Locomotor = HumanPanicLocomotor
Condition = SET_PANIC
Speed = NORMAL_GOOD_FAST_MEMBER_SPEED
End

LocomotorSet
Locomotor = HumanScaredLocomotor
Condition = SET_SCARED
Speed = NORMAL_GOOD_FAST_MEMBER_SPEED
End

; Fire arrow upgrade
Behavior = WeaponSetUpgrade ModuleTag_14
TriggeredBy = Upgrade_RohanFireArrows
End

;Behavior = DualWeaponBehavior ModuleTag_13
; SwitchWeaponOnCloseRangeDistance = 41
;End

Behavior = PhysicsBehavior ModuleTag_04
GravityMult = 1.0
End

Behavior = SlowDeathBehavior ModuleTag_05
DeathTypes = ALL -FADED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 15000
Sound = INITIAL ElvenWarriorVoiceDie
DeathFlags = DEATH_1
End

Behavior = SlowDeathBehavior ModuleTag_FadeDeath
DeathTypes = NONE +FADED
FadeDelay = 0
FadeTime = 5000
DestructionDelay = 5000
DeathFlags = DEATH_2
FX = INITIAL FX_UnSummonElvenAllies
End

Behavior = SquishCollide ModuleTag_06
;nothing
End

Behavior = BezierProjectileBehavior ModuleTag_08 ; Module starts asleep, and wakes up when thrown.
;
FirstHeight = 25 ; Height of Bezier control points above highest intervening terrain
SecondHeight = 25
FirstPercentIndent = 30% ; Percentage of shot distance control points are placed
SecondPercentIndent = 70%
TumbleRandomly = Yes

CrushStyle = Yes ; I don't detonate, I just hit
DieOnImpact = Yes
BounceCount = 1 ; When I hit the ground, I'll arc again
BounceDistance = 41 ; this far
BounceFirstHeight = 25 ; Height of Bezier control points above highest intervening terrain
BounceSecondHeight = 25
BounceFirstPercentIndent = 20% ; Percentage of shot distance control points are placed
BounceSecondPercentIndent = 80%

GroundHitFX = FX_ThrownRockGroundHit
GroundBounceFX = FX_ThrownRockBounceHit
End

;-----------------

Geometry = CYLINDER
GeometryMajorRadius = 8.0
GeometryMinorRadius = 8.0
GeometryHeight = 19.2
GeometryIsSmall = Yes
Shadow = SHADOW_DECAL
ShadowSizeX = 14;
ShadowSizeY = 14;
ShadowTexture = ShadowI;
End; aka Rohan Elven Warrior
Object GaladhrimWarrior
; ***ART Parameters ***

SelectPortrait = UPElven_LorienWarrior

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

;;================== 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 = Elves
EditorSorting = UNIT
ThreatLevel = 1.0
ThingClass = HORDE_UNIT
CommandPoints = 4

TransportSlotCount = TRANSPORTSLOTCOUNT_UNIT
WeaponSet
Conditions = None
Weapon = PRIMARY RohanElvenBow
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
;bow upgrade
WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY RohanElvenBow ; RohanElvenBowFireArrow
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
WeaponSet
Conditions = WEAPONSET_TOGGLE_1 ; CONTESTING_BUILDING
Weapon = PRIMARY ElvenWarriorSword ;GondorRangerSword
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
; sword upgrade
WeaponSet
Conditions = PLAYER_UPGRADE WEAPONSET_TOGGLE_1 CONTESTING_BUILDING
Weapon = PRIMARY ElvenWarriorSword
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:galadhrimWarrior
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles

CrushRevengeWeapon = SuperInfantryCrushRevenge
CommandSet = galadhrimWarriorCommandSet


; *** 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 = ElvenWarriorVoiceSelectMS
VoiceSelectBattle = ElvenWarriorVoiceSelectBattle
VoiceGuard = ElvenWarriorVoiceMove

UnitSpecificSounds
VoiceGarrison = ElvenWarriorVoiceGarrison
VoicePrimaryWeaponMode = ElvenWarriorVoiceModeBow
VoiceSecondaryWeaponMode = ElvenWarriorVoiceModeSword
End

#include "..\includes\StandardUnitEvaEvents.inc"

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 = ActiveBody ModuleTag_02
CheerRadius = EMOTION_CHEER_RADIUS
MaxHealth = ROHAN_ELVENWARRIOR_HEALTH ;BALANCE RohanElvenWarrior
MaxHealthDamaged = ROHAN_ELVENWARRIOR_HEALTH_DAMAGED
;RecoveryTime = ROHAN_ELVENWARRIOR_HEALTH_RECOVERY_TIME
End

; Fire arrow upgrade
Behavior = WeaponSetUpgrade ModuleTag_WeaponSetUpgradeTag
TriggeredBy = ElvenSilverthornArrows
CustomAnimAndDuration = AnimState:USER_4 AnimTime:0 TriggerTime:0 ;set flag forever
End

; Switch arrows being displayed.
Behavior = SubObjectsUpgrade ModuleTag_FireArrowSwapUpgrade
TriggeredBy = ElvenSilverthornArrows
ShowSubObjects = FireArowTip
End

Behavior = WeaponSetUpgrade WeaponSetUpgradeModuleTag
TriggeredBy = Upgrade_ElvenForgedBlades
CustomAnimAndDuration = AnimState:USER_5 AnimTime:0 TriggerTime:0 ;set flag forever
End

Behavior = SubObjectsUpgrade Armor_Upgrade
TriggeredBy = Upgrade_ElvenHeavyArmor
UpgradeTexture = RUElvnWorrior.tga 0 RUElvnWorriorHA.tga
UpgradeTexture = RUElvnWorrior_L.tga 0 RUElvnWorriorHA.tga
RecolorHouse = Yes
End

Behavior = ArmorUpgrade ArmorUpgradeModuleTag
TriggeredBy = Upgrade_ElvenHeavyArmor
End

Behavior = SubObjectsUpgrade ForgedBlades_Upgrade
TriggeredBy = Upgrade_ElvenForgedBlades
ShowSubObjects = Forged_Blade
End

Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS STEALTHED
MoodAttackCheckRate = 500
CanAttackWhileContained = Yes
; HoldGroundCloseRangeDistance = 41
AILuaEventsList = RohanElvenWarriorFunctions
End

LocomotorSet
Locomotor = HumanLocomotor
Condition = SET_NORMAL
Speed = NORMAL_GOOD_FAST_MEMBER_SPEED
End

LocomotorSet
Locomotor = HumanWanderLocomotor
Condition = SET_WANDER
Speed = NORMAL_GOOD_FAST_MEMBER_SPEED
End

LocomotorSet
Locomotor = HumanPanicLocomotor
Condition = SET_PANIC
Speed = NORMAL_GOOD_FAST_MEMBER_SPEED
End

LocomotorSet
Locomotor = HumanScaredLocomotor
Condition = SET_SCARED
Speed = NORMAL_GOOD_FAST_MEMBER_SPEED
End

; Fire arrow upgrade
Behavior = WeaponSetUpgrade ModuleTag_14
TriggeredBy = Upgrade_RohanFireArrows
End

;Behavior = DualWeaponBehavior ModuleTag_13
; SwitchWeaponOnCloseRangeDistance = 41
;End

Behavior = PhysicsBehavior ModuleTag_04
GravityMult = 1.0
End

Behavior = SlowDeathBehavior ModuleTag_05
DeathTypes = ALL -FADED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 15000
Sound = INITIAL ElvenWarriorVoiceDie
DeathFlags = DEATH_1
End

Behavior = SlowDeathBehavior ModuleTag_FadeDeath
DeathTypes = NONE +FADED
FadeDelay = 0
FadeTime = 5000
DestructionDelay = 5000
DeathFlags = DEATH_2
FX = INITIAL FX_UnSummonElvenAllies
End

Behavior = SquishCollide ModuleTag_06
;nothing
End

Behavior = BezierProjectileBehavior ModuleTag_08 ; Module starts asleep, and wakes up when thrown.
;
FirstHeight = 25 ; Height of Bezier control points above highest intervening terrain
SecondHeight = 25
FirstPercentIndent = 30% ; Percentage of shot distance control points are placed
SecondPercentIndent = 70%
TumbleRandomly = Yes

CrushStyle = Yes ; I don't detonate, I just hit
DieOnImpact = Yes
BounceCount = 1 ; When I hit the ground, I'll arc again
BounceDistance = 41 ; this far
BounceFirstHeight = 25 ; Height of Bezier control points above highest intervening terrain
BounceSecondHeight = 25
BounceFirstPercentIndent = 20% ; Percentage of shot distance control points are placed
BounceSecondPercentIndent = 80%

GroundHitFX = FX_ThrownRockGroundHit
GroundBounceFX = FX_ThrownRockBounceHit
End

;-----------------

Geometry = CYLINDER
GeometryMajorRadius = 8.0
GeometryMinorRadius = 8.0
GeometryHeight = 19.2
GeometryIsSmall = Yes
Shadow = SHADOW_DECAL
ShadowSizeX = 14;
ShadowSizeY = 14;
ShadowTexture = ShadowI;
End



#12 Lauri

Lauri

    Old man Lauri

  • Hosted
  • 10,438 posts
  • Location:Norway
  • Projects:The 4th Age
  •  The very worst T3A Team Chamber Member

Posted 21 April 2012 - 10:39 PM

RJ edited the model and added the fx himself, which you can do try to do too if you want.

For the #include stuff..
You have to make sure they are linked to the correct .inc file. The way they work is like this;

#include "..\includes\StandardUnitEvaEvents.inc"

the ..\ means that it goes one folder up, before it then goes down into a folder named includes and tries to find the file StandardUnitEvaEvents.inc

So if you have a different setup than the original file, there will be an error. The best way to fix it is by simply add a ..\ for everytime you test it and it crashes (for each one, you go another folder up before you go down).
Meaning, try to change the first one here to the one after it:

#include "..\includes\StandardUnitEvaEvents.inc"
#include "..\..\includes\StandardUnitEvaEvents.inc"

Now, if that doesn't work, try to add it again, like this;

#include "..\..\..\includes\StandardUnitEvaEvents.inc"

If it doesn't work now, try another once more. If it doesn't work then, let us know.

Edited by Lauri, 21 April 2012 - 10:40 PM.

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#13 Chocolate Star

Chocolate Star

    Count

  • Project Team
  • 431 posts
  • Projects:BFME II: Passion & From Book 2 Game

Posted 22 April 2012 - 06:05 PM

Sorry I don't understand what you mean, I've never messed around with StandardUnitEvaEvents.inc before :S

#14 Lauri

Lauri

    Old man Lauri

  • Hosted
  • 10,438 posts
  • Location:Norway
  • Projects:The 4th Age
  •  The very worst T3A Team Chamber Member

Posted 22 April 2012 - 07:17 PM

Well then you are lost

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#15 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 22 April 2012 - 08:14 PM

just try deleting that #include from where it says it is. I try it sometimes and then it works. So, you never know...

#16 Chocolate Star

Chocolate Star

    Count

  • Project Team
  • 431 posts
  • Projects:BFME II: Passion & From Book 2 Game

Posted 23 April 2012 - 12:36 PM

managed to fix it, just pasted the noldor warrior #includes over the galadhrim warrior #includes, I'm guessing because it was a BFME1 ini file I got from obsolete.

Posted Image

Edited by marsbar, 23 April 2012 - 12:57 PM.


#17 Chocolate Star

Chocolate Star

    Count

  • Project Team
  • 431 posts
  • Projects:BFME II: Passion & From Book 2 Game

Posted 23 April 2012 - 03:09 PM

Ok new problem.

So I created the object galadhrimwarriors from rohanelvenwarriors.

At the Inn the Gladhrim Warriors can upgrade to fire arrows and they show and work (for the men inn)

But at the Galadhrim Warriors for the elves can receive the silverthorn arrows but just like the Arnor Archers the fire upgrade doesn't show wtf?

#18 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 26 April 2012 - 12:41 AM

the fire upgrade doesn't show ?


Upgrades work in multiple ways i.e one upgrade does many things to a unit

1. give a new weapon ( actual arrow shot )
2. give a new look ( fire arrow tip or silvertorn etc )
Together they combine the LOOK and EFFECT of the upgrade
Now the EFFECT is easy .. a simple weaon swap with a projectile swap and a Warhead damage nugget

The look however is harder to achieve .It requires a MODEL change i.e a subobject that represents a fire -tip to be shown or an arrow tip etc
This is the best over-all look but requires the model having such subobjects
Renx is the way to go if you want it perfect ...
You can also HOPE that the weapon may have a bone where you can attach a special FX to simulate the fire etc.


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

  End

So it not showing means that its either coded wrong OR there is nothing to Show in the first place
eg. I can't give gondor swordsmen fire swords as the fire FX is not present as a visual Renx subobject
but they can burn enemies when attacking via a new weapon .To show Fire swords would require Renx Re-modelling
or Fx adding if there is a bone on the sword to allow it


If you've ever opened a model in renx you would see some subobjects are hidden ( like a simple Flat square with a fire as the texture)
this is hidden at start and shown via upgrade

Edited by JUS_SAURON, 26 April 2012 - 12:45 AM.


#19 Chocolate Star

Chocolate Star

    Count

  • Project Team
  • 431 posts
  • Projects:BFME II: Passion & From Book 2 Game

Posted 26 April 2012 - 09:25 PM

Thanks for the help. I never model.

Guess that sucks, I'll continue, maybe use an alternative power instead of the fire arrows... :(

#20 Witch King

Witch King
  • Members
  • 38 posts

Posted 28 April 2012 - 06:00 PM

Could be possible to just copy the arrow look and effect from the lorien archers silverthorn arrows, and then use it for the Gladhrim Warriors?
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users