Make sure that the PathfinderBeacon is declared before the unit that uses it is declared. That might have something to do with it.
---[NOW WORKING]---
After much thought, I came up with the following way to create a 'Boris Airstrike' weapon, where a unit on the ground illuminates a building with a laser and calls in air support to obliterate it. This will be for the Tau Pathfinder (special ops guy).
Making the airstrike
This code replaces the Missile Defender Laser Targeting SpecialPower with a laser designator to call in airstrikes. The final code is this:
Factionunit.ini
Weapon.ini;---------------------------
Object PathfinderBeacon
; *** ART Parameters ***
Draw = W3DModelDraw ModuleTag_01
DefaultConditionState
Model = None
End
End
; ***DESIGN parameters ***
EditorSorting = STRUCTURE
Side = America
ArmorSet
Conditions = None
Armor = InvulnerableArmor
DamageFX = None
End
; *** ENGINEERING Parameters ***
RadarPriority = NOT_ON_RADAR
KindOf = IMMOBILE
Body = ActiveBody ModuleTag_02
MaxHealth = 200.0
InitialHealth = 200.0
End
Behavior = LifetimeUpdate ModuleTag_04
MinLifetime = 100 ; min lifetime in msec
MaxLifetime = 100 ; max lifetime in msec
End
Behavior = OCLUpdate ModuleTag_05 ; Context window is a reaction to this, no CommandSet
OCL = OCL_PathfinderMissileStrike
MinDelay = 60
MaxDelay = 60
CreateAtEdge = Yes ; as opposed to just creating on self
End
Behavior = DestroyDie ModuleTag_06
End
Geometry = SPHERE
GeometryMajorRadius = 10.0
GeometryIsSmall = Yes
End
;------------------------------------------------------------------------------
Object PathfinderBeaconProjectile ; This is an almost copy of the InfernoTankShell. This was necesary to stop the projectile detonating against the ground if there was a hill in the way....
; *** ART Parameters ***
Draw = W3DModelDraw ModuleTag_01
DefaultConditionState
Model = None
End
End
; *** AUDIO Parameters ***
SoundDie = A10StrikeAttack ; This causes the sound to play when it dies and creates the beacon.
; ***DESIGN parameters ***
DisplayName = OBJECT:TankShell
EditorSorting = SYSTEM
ArmorSet
Armor = ProjectileArmor
End
VisionRange = 0.0
; *** ENGINEERING Parameters ***
KindOf = PROJECTILE
Body = ActiveBody ModuleTag_02
MaxHealth = 100.0
InitialHealth = 100.0
End
Behavior = DestroyDie ModuleTag_03
;nothing
End
Behavior = DumbProjectileBehavior ModuleTag_09
DetonateCallsKill = Yes
; To tweak a Bezier path, please see GS
FirstHeight = 50 ; Height of Bezier control points above highest intervening terrain
SecondHeight = 150
FirstPercentIndent = 20% ; Percentage of shot distance control points are placed
SecondPercentIndent = 90%
FlightPathAdjustDistPerSecond = 0 ; Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag.
End
Behavior = PhysicsBehavior ModuleTag_05
Mass = 10
End
Behavior = HeightDieUpdate ModuleTag_06
TargetHeight = 1.0
TargetHeightIncludesStructures = Yes
OnlyWhenMovingDown = Yes
InitialDelay = 1000 ; Can't explode in the first second so we don't explode
on the pad
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_07
DeathWeapon = PathfinderStrikeOCL
StartsActive = Yes
End
Geometry = Sphere
GeometryIsSmall = Yes
GeometryMajorRadius = 1.0
End
OCL.ini;---------------------------------------------------
Weapon PathfinderStrikeOCL ; No extra damage, just lays down a damage field
PrimaryDamage = 0.0
PrimaryDamageRadius = 1.0
AttackRange = 100.0
DamageType = EXPLOSION
DeathType = EXPLODED
WeaponSpeed = 99999.0
ProjectileObject = NONE
FireFX = WeaponFX_RangerFlashBangGrenadeDetonation
FireOCL = OCL_PathfinderBeacon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 0 ; time between shots, msec;
ClipSize = 1 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 1000 ; how long to reload a Clip, msec
AutoReloadsClip = No
AntiGround = Yes
DamageDealtAtSelfPosition = Yes
End
;but you must also change the MissileDefenderLaserGuidedMissile weapon :
;------------------------------------------------------------------------------
Weapon MissileDefenderLaserGuidedMissileWeapon
PrimaryDamage = 1.0
PrimaryDamageRadius = 0.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly
miss by as much as this distance.
AttackRange = 300.0 ;Extending this range, allows the special ability to work better.
DamageType = ARMOR_PIERCING
DeathType = NORMAL
WeaponSpeed = 600
ProjectileObject = PathfinderBeaconProjectile
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
ScatterRadius = 0 ; This weapon will scatter somewhere within a circle of this radius,
instead of hitting someone directly
DelayBetweenShots = 500 ; time between shots, msec
ClipSize = 1 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 60000 ; how long to reload a Clip, msec
AutoReloadsClip = Yes
WeaponBonus = PLAYER_UPGRADE DAMAGE 125%
AntiAirborneVehicle = Yes
AntiAirborneInfantry = Yes
; note, these only apply to units that aren't the explicit target
; (ie, units that just happen to "get in the way"... projectiles
; always collide with the Designated Target, regardless of these flags
ProjectileCollidesWith = STRUCTURES
End
FxList.iniObjectCreationList OCL_PathfinderMissileStrike
DeliverPayload
Transport = AmericaJetA10Thunderbolt
FormationSize = 3
FormationSpacing = 35.0
WeaponConvergenceFactor = 0.5
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 1 ;max attempts
DropDelay = 500 ;time in between each set of items
dropped (if more than one)
DeliveryDistance = 450 ;distance from target allowed to
start/stop dropping.
VisibleItemsDroppedPerInterval = 2 ;Drops two bombs at a time
VisibleDropBoneBaseName = WeaponA ;The bombs are created and dropped at
this bone base
VisibleSubObjectBaseName = Missile ;The bombs are visible until dropped.
VisibleNumBones = 6 ;Number of bones.
VisiblePayloadTemplateName = A10ThunderboltMissile ;Created when payload is dropped.
VisiblePayloadWeaponTemplate = A10ThunderboltMissileWeapon
InheritTransportVelocity = Yes ;The bombs will start at transport
velocity.
ExitPitchRate = 30 ;The bomb will pitch down.
DiveStartDistance = 500
DiveEndDistance = 300
StrafingWeaponSlot = PRIMARY ;Strafe while diving (so long target
point is within weapon range)
StrafeLength = 450
StrafeWeaponFX = FX_DamageTankStruckSmallArms
End
End
;--------------------------------------
ObjectCreationList OCL_PathfinderBeacon
CreateObject
ObjectNames = PathfinderBeacon
Count = 1
End
End
Voice.ini; ----------------------------------------------
FXList WeaponFX_PathfinderStrike
LightPulse
Color = R:255 G:0 B:0
Radius = 30
IncreaseTime = 0
DecreaseTime = 300
End
End
SpecialPower.iniAudioEvent A10StrikeAttack ; Actually just the Raptor attack sounds but slightly louder and heard by everyone......
Sounds = vrapa2a vrapa2b vrapa2c vrapa2d vrapa2e vrapa2f
Control = random
Attack = gradio1a gradio1b gradio1c gradio1d gradio1e gradio1f
Decay = gradio3a gradio3b gradio3c gradio3d gradio3e
Volume= 100
Type = world global everyone
End
;-----------------------------------------------------------------------------
SpecialPower SpecialAbilityMissileDefenderLaserGuidedMissiles
Enum = SPECIAL_MISSILE_DEFENDER_LASER_GUIDED_MISSILES
ReloadTime = 120000 ; every two minutes
PublicTimer = No
End
This code is now complete except for actually getting the laser to fire at structures instead of vehicles. Also, units will have to be upgraded individually (at a big cost eg. 800c) to actually be able to use it. You may have delete some line spaces because posting on the forums screwed up the formatting. Also, you are free to use this in your mod but please credit me![]()
Make sure that the PathfinderBeacon is declared before the unit that uses it is declared. That might have something to do with it.
You mean move it above the missile defender in factionunit.ini ? I'll try that now.
EDIT: Nope. Doesn't work
EDIT 2: I think it might be because the missile projectile doesn't actually die. I just tried giving it the toxin field creation weapon firewhendead and that didn't work either.
Errr...guys? Problem.....
That looks familair...
So how did you fix it then?
WOAH.... that looks like it might hurt.
change the reload time for the laser
I see your problem.
The unit targeting the area is hitting it over and over instead of using 1 constant shot you have him repeating it hence you have 20,000 A10's.
You need to change your code a little so he only fire's once every so often (Like Boris did was every 2 mins) Or you will get this problem over and over again...
CH...![]()
![]()
![]()
AHHH! lotsa planes.
yup reload timer should help that out alot
give it a ammo of 1 and a long reload time
Bookmarks