But of course it doesn't.
The problem is it doesn't even spit out any of the garbage info. Can anyone help this poor old soul?
------------------
The Sniper Missions. Current project, The Sniper Missions
The Magician Saber System.
Code:
- cog - # Jedi Knight Cog Script # # TARGET.COG # # Target's class cog, for the damaging stuff and yeah... # # [DP] # symbols int player local int type local int hitDir local flex vertDis local vector hitArea local message damaged end # ======================================================================================== code Damaged: player = GetSenderRef(); // type = GetParam(1); PrintInt(player); // PrintInt(type); Print("Damaged"); If(1) // This will handle all hit keys, movement, etc. { // Find the vertical distance and hitArea hitArea = VectorSub(GetThingPos(GetSourceRef()), GetThingPos(player))); vertDis = VectorZ(hitArea); hitArea = VectorNorm(hitArea); // Try to convert to 2d If(VectorX(hitArea) > .7071 && VectorY(hitArea) < .7071 && VectorX(hitArea) > .7071 && VectorY(hitArea) > -.7071) hitDir = 1; Else If(VectorX(hitArea) < .7071 && VectorY(hitArea) < -.7071 && VectorX(hitArea) > -.7071 && VectorY(hitArea) < -.7071) hitDir = 2; Else If(VectorX(hitArea) < -.7071 && VectorY(hitArea) > -.7071 && VectorX(hitArea) > -.7071 && VectorY(hitArea) < .7071) hitDir = 3; Else hitDir = 0; PrintInt(hitDir); PrintVector(hitArea); // This is where we "use" those numbers If(vertDis >= 0.037) // Head shot { Print("Head shot"); } Else If(vertDis <= -0.025) // Leg shot { If(VectorX(hitArea) > 0) // Right leg shot { Print("Right leg shot"); } Else If(VectorX(hitArea) < 0) // Left leg shot { Print("Left leg shot"); } Else // otherwise ohhh.... that's gonna hurt { Print("Ooouch!"); } } Else // Otherwise it must be a body shot { If(hitDir == 1) // Right arm shot { Print("Right arm shot"); } Else If(hitDir == 3) // Left arm shot { Print("Left arm shot"); } Else // Back/Chest shot { Print("Chest/Back shot"); hitDir = 1 - hitDir; // Reverse if on back If(VectorX(hitArea)*hitDir > 0) // Right from chest // Left from back { Print("Right/Left side shot"); } If(VectorX(hitArea)*hitDir < 0) // Left from chest // Right from back { Print("Left/Right side shot"); } } } ReturnEx(0); Return; } Return; end - Template - based on: _humanactor thingflags=0x20000401 light=0.2 model3d=ky.3do puppet=ky.pup size=0.065 movesize=0.065 cog=target.cog health=4000000 maxhealth=4000000
The problem is it doesn't even spit out any of the garbage info. Can anyone help this poor old soul?
------------------
The Sniper Missions. Current project, The Sniper Missions
The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms
Completed
Judgement Day (HLP), My level pack
SATNRT, JK Pistol Mod, Aliens TC, Firearms
Completed
Judgement Day (HLP), My level pack