The 3rd Age

Age Of Men

Age Of Men

Age of Men will be some like an unofficial expansion set for BFME2:ROTWK

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!

   

Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

Rohirrim Archer Turret Horde

Avatar of Rob38

Rob38

Category: Code
Level: Expert
Created: Saturday January 19, 2008 - 22:07
Updated: Sunday March 20, 2011 - 13:22
Views: 9967
Summary: Getting Rohirrim Archers to fire while moving

Rating

Staff says

4.5

Members say

4.0

Average

4.2/5.0

10 votes

Page 1 2 3 4 5 6
12. First, for the horde object, create two new weaponsets.
              
Code

    WeaponSet
        Conditions    = None
        Weapon        = PRIMARY NormalMissileHordeRangefinder
                
    End

    WeaponSet
        Conditions = WEAPONSET_CREATE_A_HERO_WS_01
        Weapon = PRIMARY RohanRohirrimBowMovingHD
        AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
    End

If you notice, the first weaponset uses the standard horde range finder. For the second though, it uses the same weapon as the one for the unit! Why should you do this? Well, it turns out that by trying to create a moving missle horde range finder for the horde doesn't work for some reason. Normally, you would create something like this:
              
Code

Weapon MovingMissileHordeRangefinderHD
    AttackRange            = 275
    
    RangeBonusMinHeight    = 10
    RangeBonus        = 1
    RangeBonusPerFoot    = 1 ; ;#MULTIPLY( DWARVEN_MENOFDALE_RANGE .01 )
    
    
    DelayBetweenShots        = 1000 ;1500
    LeechRangeWeapon        = Yes
    AcceptableAimDelta        = 45
    AntiAirborneVehicle        = Yes
    AntiAirborneMonster        = Yes
    FinishAttackOnceStarted     = No
RequireFollowThru     = Yes
RotatingTurret     = Yes
IsAimingWeapon = Yes
    CanFireWhileMoving     = Yes
    CanFireWhileCharging     = Yes
    HordeAttackNugget
    End

End

No matter what I do, it just doesn't want to work in the horde. But if you just use the weapon for the unit, it works. The only problem is that there is one major drawback to this method (as explained on the final page).

13. Edit the HordeAIUpdate behavior so it's similar to the unit one.
              
Code

Behavior = HordeAIUpdate ModuleTag_HordeAIUpdate
        AutoAcquireEnemiesWhenIdle    = Yes ATTACK_BUILDINGS
        MoodAttackCheckRate            = 500
        MaxCowerTime                = 5000
        MinCowerTime                = 3000
        AILuaEventsList    = RohirrimArcherHDFunctions ;CavalryFunctions ;
        AttackPriority                = AttackPriority_Cavalry
Turret
            TurretTurnRate = 180        ; turn rate, in degrees per sec
            ;;;TurretPitchRate = 30        ; does not pitch
            ControlledWeaponSlots = PRIMARY
        
;;;; Use these to restrict the firing arc of the turret ;;;
            NaturalTurretAngle = 0        ; Natural angle of the turret relative to the front of the object
            TurretMaxDeflectionCW = 180 ;90    ; Maximum deflection of the turrect clockwise from the natural turret angle
            TurretMaxDeflectionACW = 180    ; Maximum deflection of the turrect anti-clockwise from the natural turret angle
;;;; -------------------------------------------------- ;;;
        End
    End


14. Finally, add the same three Moving behaviors from your unit object.
              
Code

    Behavior = WeaponSetUpgrade MountWeapon
        TriggeredBy     = Upgrade_MovingBow
        WeaponCondition         = WEAPONSET_CREATE_A_HERO_WS_01
        ConflictsWith         = Upgrade_NotMovingBow
    End

    Behavior = ObjectCreationUpgrade ModuleTag_RemoveUpgrades1
    TriggeredBy = Upgrade_MovingBow
    RemoveUpgrade = Upgrade_NotMovingBow
    End

    Behavior = ObjectCreationUpgrade ModuleTag_RemoveUpgrades2
    TriggeredBy = Upgrade_NotMovingBow
    RemoveUpgrade = Upgrade_MovingBow
    End


You should now having a working turret horde. Read the final page for the issues with the horde object.

Links / Downloads

 HitsAdded
Tank turrets in BFME 2 Tutorial2180January 19, 2008 - 22:23

Comments

Display order: Newest first

Carthaen - Wednesday April 12, 2017 - 12:49

I don't understand why it's not working... I did all like it was in tutorial. I tried to do it for Rivendell Archers in ROTWK... And it was no results...

drogoth232 - Tuesday May 5, 2009 - 14:05

Where do I find scriptevents.xml?

Rob38 (Team Chamber Member) - Friday May 23, 2008 - 16:04

It depends on how advanced you want your setup to be. The scripts allows for two different weaponsets to be created, one for moving and one for not moving. This is so that I can change attack power, accuracy, etc. You can try to set it up without the scripts, but I'm not sure how well it will work.

galentv - Friday May 23, 2008 - 11:25

is the scriptevents.xml and scripts.lua very necessary? Please say no, because i dont know how to get them...

Rob38 (Team Chamber Member) - Wednesday January 23, 2008 - 19:41

Well, first, I don't think there are animations for Theoden swinging his sword on both sides of the horse. Second, you would have two melee attacks being performed at the same time so I don't really know how well that would work. But I think it would be possible, although it may look a little bit strange ;)

Dwar the wolf - Tuesday January 22, 2008 - 4:04

can this done with Theoden while charging he attacks with his sword only (no bow) also how to make him use both hands in attack when mounting to left and right ..( like in movie in Helmsdeep)

Sulherokhh (Team Chamber Member) - Sunday January 20, 2008 - 8:27

Yeehaa! Different WeaponSets! Veeery neat! :)

Go to top

 

"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."

 
10:15:43