Hallo, wie ihr sicher noch nicht bemerkt habt, wurde der Thread zu einem FdK Team Codingfragen Thread umgebaut, also fang ich gleich mal an:
Meine Einheit hat 2 Waffen: Eine die in 90° feuern kann, und eine die in 270° feuern kann. Beide sind bis auf den Eintrag, der den Winkel ändert identisch und jeweils als PRIMARY und SECONDARY im Weaponset drinnen. Wenn ich nun einen gegner angreife, schießt zuerst die erste Waffe, dann dreht sich die Einheit und feuert die 2te, dan dreht sie sich wieder und es beginnt von Vorne.
Meine Frage ist nun also, wie bring ich die Einheit dazu, immer die Waffe (auch wenn sie noch nicht nachgeladen ist) zu benützen, mit der sie sich am wenigsten bewegen (Drehen) muss?
Die Weapons:
Weapon Weapon1
AttackRange = ISENGARD_BALLISTA_RANGE
RangeBonusMinHeight = 30 ; = 10
RangeBonus = 1
RangeBonusPerFoot = #MULTIPLY( ISENGARD_BALLISTA_RANGE .003 )
FireFX = FX_GondorSwordHit
;MinimumAttackRange = 100.0
WeaponSpeed = 401 ; dist/sec
MinWeaponSpeed = 401
FXTrigger = CATAPULT_ROCK
PreAttackType = PER_SHOT ; Do the delay each time we attack a new target
PreAttackDelay = ISENGARD_BALLISTA_PREATTACKDELAY
FiringDuration = ISENGARD_BALLISTA_FIRINGDURATION
DelayBetweenShots = ISENGARD_BALLISTA_DELAYBETWEENSHOTS
RequireFollowThru = Yes
NoVictimNeeded = Yes ; Need no target
LeechRangeWeapon = Yes
ClipSize = 1
AutoReloadsClip = Yes
ClipReloadTime = ISENGARD_BALLISTA_FIRINGDURATION
HitPercentage = 70 ; Hit percentage must be 100% to allow it to target units on walls. Otherwise becomes useless. .
ScatterRadius = 50.0 ;When this weapon misses it can randomly miss by as much as this distance.
AimDirection = 90
CanFireWhileMoving = Yes
HordeAttackNugget
End
ProjectileNugget ; A Nugget that creates an Object and sends it to the target with a Warhead
ProjectileTemplateName = ProjectileTemplateName
WarheadTemplateName = WarheadTemplateName
End
End
Weapon Weapon2
AttackRange = ISENGARD_BALLISTA_RANGE
RangeBonusMinHeight = 30 ; = 10
RangeBonus = 1
RangeBonusPerFoot = #MULTIPLY( ISENGARD_BALLISTA_RANGE .003 )
FireFX = FX_GondorSwordHit
;MinimumAttackRange = 100.0
WeaponSpeed = 401 ; dist/sec
MinWeaponSpeed = 401
FXTrigger = CATAPULT_ROCK
PreAttackType = PER_SHOT ; Do the delay each time we attack a new target
PreAttackDelay = ISENGARD_BALLISTA_PREATTACKDELAY
FiringDuration = ISENGARD_BALLISTA_FIRINGDURATION
DelayBetweenShots = ISENGARD_BALLISTA_DELAYBETWEENSHOTS
RequireFollowThru = Yes
NoVictimNeeded = Yes ; Need no target
LeechRangeWeapon = Yes
ClipSize = 1
AutoReloadsClip = Yes
ClipReloadTime = ISENGARD_BALLISTA_FIRINGDURATION
HitPercentage = 70 ; Hit percentage must be 100% to allow it to target units on walls. Otherwise becomes useless. .
ScatterRadius = 50.0 ;When this weapon misses it can randomly miss by as much as this distance.
AimDirection = 270
CanFireWhileMoving = Yes
HordeAttackNugget
End
ProjectileNugget ; A Nugget that creates an Object and sends it to the target with a Warhead
ProjectileTemplateName = ProjectileTemplateName
WarheadTemplateName = WarheadTemplateName
End
End