Author Topic: [TIP] Easy way to make datablock duplicates  (Read 697 times)

I noticed barely anybody uses this, if you want to make, say, a projectile, you don't need to copy every single value of the gun projectile and slowly modify it, it discourages a lot of people from finishing the job

use this,

datablock ProjectileData(MyProjectile : GunProjectile)
{
uiname = "My Projectile";
};

what this does is create an exact duplicate of the gun projectile, with the damage, variables and everything, this makes it easy to, say, create a new projectile datablock that works exactly like the gun projectile, only does more damage and has a different shape

datablock ProjectileData(MyProjectile : GunProjectile)
{
uiname = "My Projectile";
shapeFile = "./MyProjectile.dts";
directDamage = 1000000000000;
};

when you enter the new variable values, it overwrites the old (doesen't cause any problems tho)

can be done with vehicles too, like so

datablock  WheeledVehicleData(MyVehicle : JeepVehicle)
{
uiname = "My New Jeep";
};

Upon creating this topic, I took into account that there is indeed another post on the same subject, but isn't noticed enough
« Last Edit: December 25, 2011, 10:51:34 AM by soba »

Nice topic, it's helpful.

What if you want your weapon/item/whatever to have the exact same projectile/whatever as a default weapon/whatever?
« Last Edit: December 25, 2011, 01:11:48 PM by jes00 »

Nice topic, it's helpful.

What if you want your weapon/item/whatever to have the exact same projectile/whatever as a default weapon/whatever?
What do you mean?

projectile = GunProjectile;?

(use ForceRequiredAdd-on with this incase the projectile is loaded before your weapon)
« Last Edit: December 25, 2011, 01:55:48 PM by soba »

What do you mean?

projectile = GunProjectile;?

(use ForceRequiredAdd-on with this incase the projectile is loaded before your weapon)
Never mind