datablock ItemData(GoldItem)
{
category = "Weapon"; // Mission editor category
className = "Weapon"; // For inventory system
shapeFile = "base/data/shapes/brickweapon.dts";
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;
rotate = true;
uiName = "Gold";
doColorShift = false;
colorShiftColor = "0.823 0.627 0.117 1.000";
canDrop = true;
};
function GoldItem::onAdd(%this, %obj)
{
%obj.setShapeName("TEXT HERE");
Parent::onAdd(%this, %obj);
}
package GoldPackage
{
function Armor::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f)
{
if(%col.dataBlock $= "GoldItem" && %obj.getDamagePercent() < 100 && %col.canPickup)
{
Parent::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f);
//stuff
}
}
};
activatePackage(GoldPackage);