Author Topic: Safety Wand  (Read 1326 times)

« Last Edit: June 08, 2007, 04:24:23 AM by Nate »

So a wand exactly the same as a destructo wand? Except you have to hit the brick twice to kill it?
I suppose it could be useful at times, or you could just be more careful with your hitting of bricks :P

« Last Edit: June 08, 2007, 04:24:33 AM by Nate »

Or a small signal coming up signifying that this brick is supporting 10 or more bicks

Oh i see what you mean, like this?

Code: [Select]
datablock ProjectileData(SafetyWandProjectile : WandProjectile)
{
   directDamage = 0;
};

datablock ItemData(SafetyWandItem : WandItem)
{
   // Mission editor category
   className = "Tool";

   //gui stuff
   uiName = "Safety wand";

   // Dynamic properties defined by the scripts
   image = SafetyWandImage;
   canDrop = true;
};

datablock ShapeBaseImageData(SafetyWandImage : WandImage)
{
   // Projectile && Ammo.
   item = SafetyWandItem;
   projectile = SafetyWandProjectile;
};

function SafetyWandProjectile::onCollision(%this, %obj, %col, %fade, %pos, %normal)
{
if(%col.isSafe == 0)
    {
         %col.isSafe = 1;
          messageClient(%obj.client,'',"Brick is now safe.");
    }
else if(%col.isSafe == 1)
    {
          %col.isSafe = 0;
          messageClient(%obj.client,'',"Brick is not safe.");
    }
}

package Safetywand
{
function AdminWandProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
     {
          if(%col.isSafe)
          {
          return;
          }
          Parent::onCollision(%this,%obj,%col,%fade,%pos,%normal);
     }
};
activatepackage(Safetywand);
« Last Edit: June 03, 2007, 02:35:04 AM by Game master pro »