QUOTE (Oliver @ 24 Sep 2013, 17:20)
I changed the topic since i resolved the other one and since there were no replies (i think there should't be any problem, if there is, i'm sorry)
How do i do to alter the damage according to the positioning to an explosion radius.. Like the more close to the center, the more dmg it deals?
There are two ways to do this.
You can simply use a PrimaryDamageRadius for the big damage inside a small radius, and then add SecondaryDamageRadius at a bigger distance.
Example - EA did the Scorpion's missile this way.
CODE
;------------------------------------------------------------------------------
Weapon ScorpionMissileWeapon
PrimaryDamage = 100.0
PrimaryDamageRadius = 5.0
SecondaryDamage = 80.0
SecondaryDamageRadius = 25.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 150.0
MinimumAttackRange = 40.0
DamageType = EXPLOSION ; ignored for projectile weapons
DeathType = EXPLODED
WeaponSpeed = 600 ; ignored for projectile weapons
ProjectileObject = ScorpionMissile
ProjectileExhaust = MissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicMissileExhaust
FireFX = FX_BuggyMissileIgnition
FireSound = ScorpionMissileWeapon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 200 ; time between shots, msec
ClipSize = 1 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 15000 ; how long to reload a Clip, msec
AutoReloadsClip = Yes
ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation
; 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
WeaponBonus = PLAYER_UPGRADE DAMAGE 125% ; AP weapon upgrade
End
Second way is using the neutron missile logic.
This is only a part of the code, but you already know that stock nuke has got multiple blasts. This will give you more power over the gradually decreasing damage ( and it will topple tree's).
CODE
Blast1Enabled = Yes
Blast1Delay = 580 ;in milliseconds
Blast1ScorchDelay = 100 ;in milliseconds
Blast1InnerRadius = 60.0 ;objects inside this get the full damage
Blast1OuterRadius = 60.0 ;objects inside this get some of the full damage
Blast1MaxDamage = 0.0 ;damage within inner radius of blast
Blast1MinDamage = 0.0 ;always do at least this much damage to objects
Blast1ToppleSpeed = 0.5 ;higher #'s topple faster
Blast1PushForce = 10.0 ;higher #'s push more