Archers Firing while moving
#41
Posted 03 January 2008 - 11:19 PM
If it were just a problem with the anims, I'd suggest you play with DependencySharedModelFlags in the Horde code, but they shoot straight at the ground?! that's something I've never seen before ...
I'm afraid I really can't be of much help there if you've really tried to tinker with both the weapon and the AIUpdate ...
I seem to recall coding it for RA and posting the code back in the old forums, but they're gone now ...
#42
Posted 04 January 2008 - 02:04 AM
So you actually got it to work for a horde? At least I know it is possible.I seem to recall coding it for RA and posting the code back in the old forums, but they're gone now ...
Ok, here's the code that I have so far:
Model Condition Unit
ExtraPublicBone = FIREAROWTIP;Turret01 ; bow DefaultModelConditionState Model = rurhrmarchHD WeaponLaunchBone = PRIMARY FIREAROWTIP Turret = FIREAROWTIP;B_SPINE1;BAT_SPINE2 EndWeapon Unit
Weapon RohanRohirrimBowMovingHD ; BALANCE Archer Weapon AttackRange = ROHAN_HORSEBOW_RANGE;350 RangeBonusMinHeight = 10 RangeBonus = 1 RangeBonusPerFoot = 1;;#MULTIPLY( ROHAN_HORSEBOW_RANGE .01 ) 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 = 45;When this weapon is used it will hit exactly 50% of the time. ScatterRadius = 30.0;When this weapon misses it can randomly miss by as much as this distance. PreAttackDelay = 700 PreAttackType = PER_SHOT; Do the delay each time we attack a new target PreAttackRandomAmount = 200 FiringDuration = 1500; Duration of the archer firing shot is 1000ms. RequireFollowThru = Yes ClipSize = 1 AutoReloadsClip = Yes ClipReloadTime = 1500 RotatingTurret = Yes IsAimingWeapon = Yes AntiAirborneVehicle = Yes AntiAirborneMonster = Yes CanFireWhileMoving = Yes CanFireWhileCharging = Yes CanBeDodged = Yes; Will check for a DodgePercent on the target to have a second chance at failing HitPercent HitPassengerPercentage = 20% ProjectileNugget; Default arrow ProjectileTemplateName = RockBigTreeberd;RohanArcherArrowProjectile WarheadTemplateName = RohirrimBowWarheadHD ForbiddenUpgradeNames = Upgrade_RohanRedArrowsStrong End ProjectileNugget; Fire arrow avialble through fire upgrade ProjectileTemplateName = RockBigTreeberd;RohanArcherUpgradeArrowProjectile WarheadTemplateName = RohirrimBowRedArrowsWarheadHD RequiredUpgradeNames = Upgrade_RohanRedArrowsStrong End EndWeapon Horde
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 RotatingTurret = Yes;tried both with and without CanFireWhileMoving = Yes;same as bove CanFireWhileCharging = Yes;same as above HordeAttackNugget End EndUnit AIUpdateInterface
Behavior = AIUpdateInterface ModuleTag_03 AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS AILuaEventsList = RohirrimArcherHDFunctions 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 EndHordeAIUpdate
Behavior = HordeAIUpdate ModuleTag_HordeAIUpdate AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS MoodAttackCheckRate = 500 MaxCowerTime = 5000 MinCowerTime = 3000 AILuaEventsList = 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
Like I said before, I tried removing the turret from the HordeAIUpdate but it wasn't successful.
Edited by Rob38, 04 January 2008 - 02:05 AM.
#43
Posted 04 January 2008 - 02:06 PM
the bits that stand out to me where i'd try out changing are...:
RequireFollowThru = Yes
FinishAttackOnceStarted = No
also you said you tried removing turret from horde ai update,
have you tried removing it from the horde weapon aswell??
sorry this probably isnt great help, but those are the bits i'd try changing if i were you.
the guy i did was a rohan hero i created
so not too sure on hordes
Edited by jimiojoe, 04 January 2008 - 02:26 PM.
A light from the shadow shall spring.
#45
Posted 12 January 2008 - 11:00 PM
#46
Posted 13 January 2008 - 02:03 AM
That's about where i put it on the shelf and started working on something else.
Axed Head and A.I. Coder for S.E.E. and ... stuff
".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."
#47
Posted 13 January 2008 - 03:31 AM
You got it to somewhat work for a horde also? Perhaps you can send me your code so I can compare it with mine and see if anything is different. Did you also get stuck on the animation and clumping part too?
That's about where i put it on the shelf and started working on something else.
Edited by Rob38, 13 January 2008 - 03:31 AM.
#48
Posted 13 January 2008 - 04:28 AM
I think the problem lies with the double function of the rangefinder. It is used for all kind of target acquisition, both for melee/missile AND for checking the targets 'crushability'. If it can crush, it will probably always try to jump on top of the target before executing the normal attack. In the case of the horde, i think it dissolves the horde structure. The 'horde' object jumps on top, while the horde members loose coherence and lag behind, desperately trying to catch up with the 'horde' center.
If there was a solution to that, i think the animations would easily fall in place ('FIRING_OR_RELOADING_A MOVING ATTACKING'). There could be a workaround i haven't found yet, but i imagine it will necessitate removing the 'crusher' from the horde.
I am not entirely sure of course, but you can imagine i got kind of fed up after a few weeks of that stuff when i was more interested in the AI. Anyway, as you probably well know, there are running-shooting anims for rohirrim. Sad to think that they might be wasted. I believe EA had planned to put them in with a modified hardcoded AIUpdate and a new weapon attribute, probably without the turret logic, or so it looks to me when i see how they made the completely new fire and reload anims for different angles. But who knows...
Axed Head and A.I. Coder for S.E.E. and ... stuff
".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users