Poll

Use ShadowsfeaR's model?

Yes (WONNNNNNNN, model will become optional, default on yes)
No, don't change any model
Sorta, TF2 Wrangler needs to look like that (not advised by Lordician)
No, it's ugly, get an other one.
Dunno (not advised, wrangling a rocket sentry is deadly to you)

Author Topic: Lordician's sentry extra's (Release: Script_SentryTF2)  (Read 26234 times)

lordician, you could base your sapper on this if you want.

(copied from Weapon_ElectroSapper.cs from the Gamemode_BlockBastion project)
Code: [Select]
datablock itemData(tf2_sapperItem)
{
category = "item";
equipment = true;

uiName = "Electro Sapper";
iconName = "base/client/ui/avatarIcons/accent/visor";
doColorShift = true;
colorShiftColor = "0.3 0.3 0.3 1";

shapeFile = "base/data/shapes/brickWeapon.dts";
emap = false;
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;

image = tf2_sapperImage;
canDrop = true;
};

datablock shapeBaseImageData(tf2_sapperImage)
{
className = "weaponImage";
item = tf2_sapperItem;

shapeFile = tf2_sapperItem.shapeFile;
emap = tf2_sapperItem.emap;
doColorShift = tf2_sapperItem.doColorShift;
colorShiftColor = tf2_sapperItem.colorShiftColor;

mountPoint = 0;
offset = "0 -0.05 0";
rotation = "0 1 0 180";
eyeOffset = "0.7 1.2 -0.8";
eyeRotation = "0 1 0 180";

correctMuzzleVector = false;

melee = true;
armReady = true;

stateName[0]                    = "activate";
stateTimeoutValue[0]            = 0.5;
stateTransitionOnTimeout[0]     = "ready";

stateName[1]                    = "ready";
stateTransitionOnTriggerDown[1] = "fire";
stateAllowImageChange[1]        = true;

stateName[2]                    = "fire";
stateTransitionOnTriggerUp[2]   = "ready";
stateScript[2]                  = "onFire";
};

function tf2_sapperImage::onFire(%this,%obj,%slot)
{
   if(!isObject(%cl = %obj.client))
      return;
   if(!isObject(%pl = %cl.player))
      return;

   %l=VectorAdd(%pl.getEyePoint(), VectorScale(%pl.getEyeVector(),10));
   %raycast=containerRaycast(%pl.getEyePoint(), %l, $TypeMasks::PlayerObjectType, %pl);
   
   if(!isObject(%build = firstWord(%raycast)))
      return;
   if(!isObject(%build.sentryOwner))
      return;
   if(%build.beingSapped)
      return;
   if(%build.bb_team !$= %cl.bb_team)
      %build.startSap(%cl);
}


function SimObject::startSap(%this,%cl)
{
   if(strLen(%this.dataBlock) && %this.dataBlock $= "playerSentryBottom")
      %obj = %this.sentryTop;
   else
      %obj = %this;
   if(%obj.beingSapped)
      return;
   %obj.beingSapped = true;
   %obj.spySapping = %cl;
   %obj.sapperHealth = 2;
   if(%obj.dataBlock $= "playerSentryTop")
      serverCmdMessageSent(%obj.sentryOwner @ "VOICE","\c6Spy sappin' my sentry!");
   else
      serverCmdMessageSent(%obj.owner @ "VOICE","\c6Spy sappin' my "@strLwr(%obj.bb_type)@"!");
   %obj.schedule(500,sapTick);
}
function SimObject::stopSap(%this)
{
   cancel(%this.sapTick);
   %this.beingSapped = false;
   %this.sapperHealth = 0;
}
function SimObject::sapTick(%this)
{
cancel(%this.sapTick);
if(!%this.beingSapped)
return;
%this.addHealth(-25);
%this.sapTick = %this.schedule(1000,sapTick);
}
« Last Edit: December 04, 2010, 04:18:51 AM by Bauklotz »

lordician, you could base your sapper on this if you want.

-snip-
Where did you get that? O_o




lordician, you could base your sapper on this if you want.
Thanks, i still haven't worked on it.
Lazyness gogogo. :S

From bushido's sentry sapper.
"(copied from Weapon_ElectroSapper.cs from the Gamemode_BlockBastion project)"

Where did you get that? O_o
I made it--?

Thanks, i still haven't worked on it.
Lazyness gogogo. :S
Altho' you'll still have to modify that code a bit, cause of models, Block Bastion functions being used in there, and based on a slightly modified version of Bushido's sentries.
« Last Edit: December 05, 2010, 02:05:16 AM by Bauklotz »

"(copied from Weapon_ElectroSapper.cs from the Gamemode_BlockBastion project)"
I made it--?
Altho' you'll still have to modify that code a bit, cause of models, Block Bastion functions being used in there, and based on a slightly modified version of Bushido's sentries.
I see.
Thanks anyways, sure it will be usefull.

fifth page?
THIS IS BLASPHEMY!




Is anyone else having problems with the variable for metal?

Bump
A wild Kalphiter bumps MY topic?
IZ NOT POSSIBLE.

Probably because you want to show everyone how silly i am since i didnt work much on it. ;P

Is anyone else having problems with the variable for metal?
<var:pl:metal> should work fine.
IF you have the latest variable add-on that is.

I have the latest VCE, still can't do anything.

Is there some special way you do this? (as in give me an example of how you would make it display bottom print)