Author Topic: Headshot Only Playertype  (Read 3065 times)

I'm looking for a player where damage it only applied when hit in the head. I tried searching for it but nothing came up.  So can anyone make this?

This sounds like a good idea actualy GG

Why am I thinking of a quickscope simulator coming from this?

Why am I thinking of a quickscope simulator coming from this?
>airhorn
>OOOOOHHH
>this mod

>we did it


okay yeah this is hm but wait what
how do you do that
like
the head doesn't have its own hitbox, how do you detect a headshot
therefore this might not be possible
but
This sounds like a good idea actualy GG

>airhorn
>OOOOOHHH
>this mod

>we did it


okay yeah this is hm but wait what
how do you do that
like
the head doesn't have its own hitbox, how do you detect a headshot
therefore this might not be possible
but
T+T detected headshots. this is entirely possible.

Download - Support_HeadshotsOnly

Source (datablocks hidden)

package Support_HeadshotOnly
{
   function ShapeBase::damage(%this,%sourceObject,%position,%damage,%damageType,%damageLoc)
   {
      if(getWord(%position, 2) > getWord(%this.getWorldBoxCenter(), 2) - 3.3 * getWord(%this.getScale(),2) && (%this.getDatablock().headshotsOnly || %this.headshotsOnly))
         return Parent::damage(%this,%sourceObject,%position,%damage,%damageType,%damageLoc);
      else if(!%this.getDatablock().headshotsOnly && !%this.headshotsOnly)
         return Parent::damage(%this,%sourceObject,%position,%damage,%damageType,%damageLoc);
   }
};
ActivatePackage(Support_HeadshotOnly);

Download - Support_HeadshotsOnly

Source (datablocks hidden)

package Support_HeadshotOnly
{
   function ShapeBase::damage(%this,%sourceObject,%position,%damage,%damageType,%damageLoc)
   {
      if(getWord(%position, 2) > getWord(%this.getWorldBoxCenter(), 2) - 3.3 * getWord(%this.getScale(),2) && (%this.getDatablock().headshotsOnly || %this.headshotsOnly))
         return Parent::damage(%this,%sourceObject,%position,%damage,%damageType,%damageLoc);
      else if(!%this.getDatablock().headshotsOnly && !%this.headshotsOnly)
         return Parent::damage(%this,%sourceObject,%position,%damage,%damageType,%damageLoc);
   }
};
ActivatePackage(Support_HeadshotOnly);

How does that prevent the damage if it's not a headshot? You're not changing %damage at all.

Download - Support_HeadshotsOnly
I need it so one player type is headshot only so that one team can be standard player
« Last Edit: July 14, 2014, 09:27:11 PM by EnderCreeper »

How does that prevent the damage if it's not a headshot? You're not changing %damage at all.
I really did not think of doing this. It works though. I'll change it up tomorrow.

Bump I really want this to happen


How does that prevent the damage if it's not a headshot? You're not changing %damage at all.
it only calls the parent when the right conditions are met

Try his thing out, if it doesn't work then ask again.
I need it so one player type is headshot only so that one team can be standard player

Seems like that's what it does.

Seems like that's what it does.

Download it, because guess what!
Code: [Select]
datablock PlayerData(HeadshotOnlyPlayerNoJet : PlayerNoJet)
{
    headshotsOnly = 1;
    uiName = "Headshot Only : No-Jet Player";
};

datablock PlayerData(HeadshotOnlyPlayer : PlayerStandardArmor)
{
    headshotsOnly = 1;
    uiName = "Headshot Only : Standard Player";
};

It makes not one, but TWO playertypes that are head shot only!