Author Topic: AddDamageType syntax?  (Read 493 times)

What do all the values do in AddDamageType? Here's the default gun's damage:
Code: [Select]
AddDamageType("Gun",   '<bitmap:add-ons/Weapon_Gun/CI_gun> %1',    '%2 <bitmap:add-ons/Weapon_Gun/CI_gun> %1',0.2,1);

It goes like this. addDamageType(%name, %Self DeleteMsg, %killMsg, %vehicleDmgScale, %isDirectDamage);

isDirectDamage? You can specify radius damage too?

Yeah, like this:
Code: [Select]
AddDamageType("RocketDirect",   '<bitmap:add-ons/Weapon_Rocket_Launcher/CI_rocket> %1',    '%2 <bitmap:add-ons/Weapon_Rocket_Launcher/CI_rocket> %1',1,1);
AddDamageType("RocketRadius",   '<bitmap:add-ons/Weapon_Rocket_Launcher/CI_rocketRadius> %1',    '%2 <bitmap:add-ons/Weapon_Rocket_Launcher/CI_rocketRadius> %1',1,0);
Notice you get the Name rocket Name when you hit someone with a rocket and the Name (rocket) Name when the rocket explodes close to them

But there is no variable for radius damage. Does radius damage use the same values as directDamage?

There is a damageRadius and a radiusDamage variable in the explosion datablock that you assigned to the projectile

There is a damageRadius and a radiusDamage variable in the explosion datablock that you assigned to the projectile
No there isn't.

Wait what the hell yes there is. I though datablock.save("file.cs"); would save all datablock variables for that type even if they aren't defined in the script. Gun bullet explosion doesn't have radiusDamage but the rocket explosion does. Great. Now I need to export all default datablocks and check them all to get the variables.