Nowaru 1 Posted February 12, 2020 The reason why I ask this, is though I've successfully used FireWeaponUpdate on various stationary "objects"... when I try and apply it to even slow projectiles, it fails miserably. I've currently been making a Disruptor style attack that fires 20 rapid projectiles that call FireWeaponUpdate every 0s or 0.1s and it very rarely hits even large structures and vehicles. (It usually hits around 1 time per each 20 projectile volley) The projectile itself travels at a WeaponSpeed of 200 (i'm not sure if this is too fast, but it seems slow to me)... it just seems completely broken functionality wise when put on anything that moves. If I'm wrong I'd appreciate it if someone could correct me / or show me where I'm going wrong. I'm happy to post code if required. Thanks everyone. ^^ Share this post Link to post
Madin 11 Posted February 13, 2020 22 hours ago, Nowaru said: The reason why I ask this, is though I've successfully used FireWeaponUpdate on various stationary "objects"... when I try and apply it to even slow projectiles, it fails miserably. I've currently been making a Disruptor style attack that fires 20 rapid projectiles that call FireWeaponUpdate every 0s or 0.1s and it very rarely hits even large structures and vehicles. (It usually hits around 1 time per each 20 projectile volley) The projectile itself travels at a WeaponSpeed of 200 (i'm not sure if this is too fast, but it seems slow to me)... it just seems completely broken functionality wise when put on anything that moves. If I'm wrong I'd appreciate it if someone could correct me / or show me where I'm going wrong. I'm happy to post code if required. Thanks everyone. ^^ From Tiberian History <!--This module controls the use of the weapon that allows the projectile to damage while it travels to a target. --> <FireWeaponUpdate id="ModuleTag_ProjectileWeapon"> <!--Adjust the fire delay time so that the leaving projectile does not damage the Disruptor it is firing from! --> <FireWeaponNugget WeaponName="DisruptorBeamProjectileWeapon" FireInterval="0.066s"/> </FireWeaponUpdate> Weapon <WeaponTemplate id="DisruptorBeam" Name="DisruptorBeam" AttackRange="300.0" WeaponSpeed="200" RadiusDamageAffects="ALLIES ENEMIES NEUTRALS" ClipSize="0" ReAcquireDetailType="PER_ATTACK" ProjectileCollidesWith="ALLIES ENEMIES NEUTRAL STRUCTURES WALLS" CanFireWhileMoving="true" MaxTargetPitch="30d" MinTargetPitch="-15d" FiringLoopSound="GDI_Disruptor_BeamWeaponLoop" FiringLoopSoundContinuesDuringReload="true" PreAttackType="PER_TARGET"> <!--Match your prefire FX v --> <PreAttackDelay MinSeconds="1.0s" MaxSeconds="1.0s"/> <!--Adjust until your projectiles are seamless, like a beam. --> <FiringDuration MinSeconds="0.0666s" MaxSeconds="0.0666s"/> <Nuggets> <ProjectileNugget WarheadTemplate="DisruptorBeamWarhead" ProjectileTemplate="FXDisruptorBeam"/> </Nuggets> </WeaponTemplate> <WeaponTemplate id="DisruptorBeamWarhead" Name="DisruptorBeamWarhead" ProjectileCollidesWith="ALLIES ENEMIES NEUTRAL STRUCTURES WALLS" RadiusDamageAffects="ALLIES ENEMIES NEUTRALS" HitStoredTarget="true"> <Nuggets> <DamageNugget Damage="50.0" DamageType="GRENADE" DamageFXType="NOD_ION" DeathType="EXTRA_3" Radius="15.0"> <DamageScalarDetails Scalar="0%"> <Filter Rule="NONE"> <IncludeThing>GDIDisruptor</IncludeThing> </Filter> </DamageScalarDetails> <DamageScalarDetails Scalar="200%"> <Filter Rule="NONE" Include="VEHICLE"/> </DamageScalarDetails> </DamageNugget> <DamageContainedNugget MaxUnitsToDamage="100" WindowBlastFX="FX_ClearGarrisonBlue" Damage="=$CLEAR_GARRISON_WEAPON_DAMAGE" DamageType="GRENADE" DeathType="NORMAL"> <DamageObjectFilter Rule="NONE" Include="INFANTRY"/> </DamageContainedNugget> <SuppressionNugget Radius="20.0" Suppression="25" DurationSeconds="5s"/> </Nuggets> </WeaponTemplate> <WeaponTemplate id="DisruptorBeamProjectileWeapon" RadiusDamageAffects="ALLIES ENEMIES NEUTRALS NOT_SIMILAR" ProjectileCollidesWith="ALLIES ENEMIES NEUTRAL STRUCTURES WALLS" AttackRange="9999999.0"> <FiringDuration MinSeconds="0.0666s" MaxSeconds="0.0666s"/> <Nuggets> <DamageNugget Damage="10.0" Radius="10.0" DamageType="GRENADE" DamageFXType="GDI_SONIC" DeathType="EXTRA_4"> <DamageScalarDetails Scalar="0%"> <Filter Rule="NONE" Include="BRIDGE_SEGMENT"> <IncludeThing>GDIDisruptor</IncludeThing> </Filter> </DamageScalarDetails> <DamageScalarDetails Scalar="200%"> <Filter Rule="NONE" Include="VEHICLE"/> </DamageScalarDetails> </DamageNugget> <SuppressionNugget Radius="20.0" Suppression="25" DurationSeconds="5s"/> </Nuggets> </WeaponTemplate> 1 Share this post Link to post
Nowaru 1 Posted February 13, 2020 Madin I love you. xD I'm not exactly sure what it was about what code I changed (mainly the timers for the passive damage, I think 0.1s must've been too long and I never thought of going below 0.1 for some reason), but I changed the arguments in each weapon (aside from clip stuff and some other bits) and now it works great. :3 Honestly I racked my brains for too long, but I'm so glad it works now. x) 1 Share this post Link to post