IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Range based damage tutorial
Sergeant Freedom
post 12 Aug 2016, 19:17
Post #1


Communism Stamper Pro
Group Icon

Group: Members
Posts: 120
Joined: 11 August 2016
From: United States Of America
Member No.: 13120
I ̶b̶r̶e̶a̶k̶ ̶t̶a̶n̶k̶s̶ stamp out communism for a livng.



When it comes to some weapons it is a nice to have the weapon do more damage to enemies who are closer up and less damage to enemies who are father away (especially on shotguns).

The way to do this is to make the unit have multiple versions of the same weapon with each weapon's minimum range set as the maximum range of the previous weapon




IMPORTANT INFO:

The only stuff that should vary from weapon to weapon are the parts in bold.

Make sure the reload time, clip size and delay between shots are the same on ALL of the weapons.

It should look similar to this:



Weapon Weapon1
PrimaryDamage = 60
PrimaryDamageRadius = 5.0
AttackRange = 50.0
DamageType = ARMOR_PIERCING
DeathType = NORMAL
WeaponSpeed = 400 ; dist/sec
WeaponRecoil = 5 ; angle to deflect the model when firing
ProjectileObject = Generic
FireFX = WeaponFX_GenericTankGunNoTracerSmall
ProjectileDetonationFX = WeaponFX_GenericTankShellDetonation
FireSound = ScorpionTankWeapon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 0
ClipSize = 1
ClipReloadTime = 1000
ProjectileCollidesWith = STRUCTURES WALLS
End

Weapon Weapon2
PrimaryDamage = 40
PrimaryDamageRadius = 5.0
AttackRange = 100.0
MinimumAttackRange = 50.0

DamageType = ARMOR_PIERCING
DeathType = NORMAL
WeaponSpeed = 400 ; dist/sec
WeaponRecoil = 5 ; angle to deflect the model when firing
ProjectileObject = Generic
FireFX = WeaponFX_GenericTankGunNoTracerSmall
ProjectileDetonationFX = WeaponFX_GenericTankShellDetonation
FireSound = ScorpionTankWeapon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 0
ClipSize = 1
ClipReloadTime = 1000
ProjectileCollidesWith = STRUCTURES WALLS
End

Weapon Weapon3
PrimaryDamage = 20
PrimaryDamageRadius = 5.0
AttackRange = 150.0
MinimumAttackRange = 100.0

DamageType = ARMOR_PIERCING
DeathType = NORMAL
WeaponSpeed = 400 ; dist/sec
WeaponRecoil = 5 ; angle to deflect the model when firing
ProjectileObject = Generic
FireFX = WeaponFX_GenericTankGunNoTracerSmall
ProjectileDetonationFX = WeaponFX_GenericTankShellDetonation
FireSound = ScorpionTankWeapon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 0
ClipSize = 1
ClipReloadTime = 1000
ProjectileCollidesWith = STRUCTURES WALLS
End



After you have done this go to the unit INI file, go to it's weaponset and put "ShareWeaponReloadTime = Yes" (to prevent the unit from firing more than one of it's weapons at a time).
It should look like this:

WeaponSet
Conditions = None
Weapon = PRIMARY Weapon1
Weapon = SECONDARY Weapon2
Weapon = TERTIARY Weapon3
ShareWeaponReloadTime = Yes
End

And that's it!

The only down side is that the unit can only have one weapon, as all three weapon slots are used for the range based damage.

This method is untested but should work.
Reply any problems you have and I'll do my best to help you.

This post has been edited by Sergeant Freedom: 12 Aug 2016, 19:20


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 28 March 2024 - 13:19