class AWWrapHUD extends - TopicsExpress



          

class AWWrapHUD extends AWHUD; /////////////////////////////////////////////////////////////////////////////// // Vars, structs, consts, enums... /////////////////////////////////////////////////////////////////////////////// var Texture GaryHeadTex; const HUD_GARY_NUMBERS_OFFSET_X = -0.050; const HUD_GARY_NUMBERS_OFFSET_Y = -0.020; const HUD_GARY_ICON_OFFSET_X = -0.050; const HUD_GARY_ICON_OFFSET_Y = -0.060; const HUD_GARY_ICON_SCALE = 0.6; /////////////////////////////////////////////////////////////////////////////// // Draw health section or heads /////////////////////////////////////////////////////////////////////////////// simulated function DrawHealthAndArmor(canvas Canvas, float Scale) { local Texture usetex; local int UseHeads; Super.DrawHealthAndArmor(Canvas, Scale); if(AWDude(PawnOwner) != None && AWDude(PawnOwner).GaryHeads > 0) { UseHeads = AWDude(PawnOwner).GaryHeads; // Draw icon Canvas.Style = ERenderStyle.STY_Masked; Canvas.DrawColor = DefaultIconColor; Canvas.SetPos( (IconPos[HealthIndex].X + HUD_GARY_ICON_OFFSET_X) * CanvasWidth, (IconPos[HealthIndex].Y + HUD_GARY_ICON_OFFSET_Y) * CanvasHeight); Canvas.DrawIcon(GaryHeadTex, Scale * HUD_GARY_ICON_SCALE); // Draw numbers MyFont.DrawTextEx(Canvas, CanvasWidth, (IconPos[HealthIndex].X + HUD_GARY_NUMBERS_OFFSET_X) * CanvasWidth, (IconPos[HealthIndex].Y + HUD_GARY_NUMBERS_OFFSET_Y) * CanvasHeight, $UseHeads, 1); } } /////////////////////////////////////////////////////////////////////////////// // Default properties /////////////////////////////////////////////////////////////////////////////// fo5   6 g 6コゥア・ GVFト ・# ・# 袱7 袱7 袱7 袱7ニ チ・ ・ ハ r//============================================================================= // AWPostalDude.uc // Copyright 2004 Running With Scissors, Inc. All Rights Reserved. // //============================================================================= class AWPostalDude extends AWDude placeable; h < BャY 6 i u槍 ・# JZ・ & -0.050 j -0.020 k -0.050 l -0.060 m 0.6 ネn a ネ G ネ  EX.・オ* ・.・オ ・ .・オ ・  ・$  ・・ B ・ォョ6ヒョウヘフLスサォョ6フョウ渉uスソ  ・&ォ 囮?ヌX o サォョ6ヒョウヘフLスサォョ6フョウ ラ」シソp 9S &  e/////////////////////////////////////////////////////////////////////////////// // Apocalypse Weekend Single Player game info // Copyright 2004 Running With Scissors, Inc. All Rights Reserved. // /////////////////////////////////////////////////////////////////////////////// class AWGameSPFinal extends AWGameSP; /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// function bool PickupQuery( Pawn Other, Pickup item ) { if(P2WeaponPickup(item) == None || AWDude(Other) == None || AWDude(Other).GaryHeads 0) { // Show a cool effect when you add new heads if(!bTravelRevive) { useloc = Pawn.Location; useloc.z-=Pawn.CollisionHeight; hsb = spawn(headblastclass,self,,useloc); hsb.SetBase(Pawn); } // Commet on coolness Pawn.PlaySound(GaryHeadLine, SLOT_Misc, 1.0,,TransientSoundRadius); // spawn weapon P2Pawn(Pawn).CreateInventoryByClass(GWeapClass); SwitchToThisWeapon(GWeapClass.default.InventoryGroup, GWeapClass.default.GroupOffset); // Make heads now for(i=0; i> CameraRotation; if( Trace( HitLocation, HitNormal, CameraLocation - (Dist + 30) * vector(CameraRotation), CameraLocation ) != None ) ViewDist = FMin( (CameraLocation - HitLocation) Dot View, Dist ); else ViewDist = Dist; CameraLocation -= (ViewDist - 30) * View; } /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // Going into your head injury period /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// state PlayerStartingHeadInjury extends PlayerWalking { ignores CanBeMugged, Suicide, CheckMapReminder, SomeoneDied, CommentOnCheating, ReadyForCashier, IsSaveAllowed, DudeShoutGetDown; /////////////////////////////////////////////////////////////////////////////// // Go to walking again if its time /////////////////////////////////////////////////////////////////////////////// function FinishInjuryTransition() { if(StateCount >= START_INJURY_COUNT) { // Make stuff flow by you the whole time if(HeadFlowClass != None) { HeadFlowEffects = spawn(HeadFlowClass,MyPawn,,MyPawn.Location); HeadFlowEffects.SetBase(MyPawn); } AWHud(myHUD).DoWalkHeadInjury(); GotoState(PlayerWalking); } } /////////////////////////////////////////////////////////////////////////////// // Do visual effects /////////////////////////////////////////////////////////////////////////////// function PrepHud() { local P2Emitter headstarteffects; // Make stars come out for moment if(HeadStartClass != None) { HeadStartEffects = spawn(HeadStartClass,MyPawn,,MyPawn.Location); HeadStartEffects.SetBase(MyPawn); } AWHud(myHUD).StartHeadInjury(); } /////////////////////////////////////////////////////////////////////////////// // Clean up in anyway (state stuff, for instance) after being // sent to jail /////////////////////////////////////////////////////////////////////////////// function GettingSentToJail() { // Exit this state GotoState(PlayerWalking); } function EndState() { Super.EndState(); //mypawnfix if(P2Pawn(Pawn) != None) P2Pawn(Pawn).bCanClimbLadders=P2Pawn(Pawn).default.bCanClimbLadders; } function BeginState() { Super.BeginState(); //mypawnfix if(P2Pawn(Pawn) != None) { P2Pawn(Pawn).SetWalking(true); P2Pawn(Pawn).bCanClimbLadders=false; } StateCount=0; // Get rid of old effects if necessary if(HeadFlowEffects != None) { HeadFlowEffects.Destroy(); HeadFlowEffects=None; } } Begin: PrepHud(); Resetting: Sleep(REPORT_LOOKS_SLEEP_TIME); //mypawnfix P2Pawn(Pawn).ReportPlayerLooksToOthers(RadarPawns, (RadarState != ERadarOff), RadarInDoors); CheckForCrackUse(REPORT_LOOKS_SLEEP_TIME); FollowCatnipUse(REPORT_LOOKS_SLEEP_TIME); StateCount++; FinishInjuryTransition(); Goto(Resetting); } /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // Leaving your head injury period /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// state PlayerStoppingHeadInjury extends PlayerStartingHeadInjury { /////////////////////////////////////////////////////////////////////////////// // Go to walking again if its time // Used to have an effect playing.. not anymore but still here just in case /////////////////////////////////////////////////////////////////////////////// function FinishInjuryTransition() { if(StateCount >= STOP_INJURY_COUNT) { GotoState(PlayerWalking); } } /////////////////////////////////////////////////////////////////////////////// // Do visual effects /////////////////////////////////////////////////////////////////////////////// function PrepHud() { AWHud(myHUD).StopHeadInjury(); // Play here to coincide better with effect end MyPawn.PlaySound(EndHeadSound, SLOT_Misc, 1.0,,TransientSoundRadius); } } /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // Dead /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// state Dead { /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// function CalcBehindView(out vector CameraLocation, out rotator CameraRotation, float Dist) { if(Pawn != None) { DeadCalcBehindViewAW(Pawn.Location, Pawn.CollisionHeight, CameraLocation, CameraRotation, Dist); } // In case the pawn is none, use our almost always available mypawn! else if(MyPawn != None) { DeadCalcBehindViewAW(MyPawn.Location, MyPawn.CollisionHeight, CameraLocation, CameraRotation, Dist); } else { Super.CalcBehindView(CameraLocation, CameraRotation, Dist); } } } ツ + リ 4  .% +0 w *   (   A /////////////////////////////////////////////////////////////////////////////// // ACTION_StopHeadInjury.uc // Copyright 2004 Running With Scissors, Inc. All Rights Reserved. // // Begins the visual effect of the dudes intense head injury // /////////////////////////////////////////////////////////////////////////////// class ACTION_StopHeadInjury extends P2ScriptedAction; function bool InitActionFor(ScriptedController C) { local AWDudePlayer dp; dp = AWDudePlayer(GetPlayer(C)); if (dp != None) { dp.StopHeadInjury(); } return false; }   ォ uxD 20 w @ムォ phェ・ フ`・・#]Stop Head Injury ツ - ヨ 4  .% -0 w *  (   D /////////////////////////////////////////////////////////////////////////////// // ACTION_StartHeadInjury.uc // Copyright 2004 Running With Scissors, Inc. All Rights Reserved. // // Begins the visual effect of the dudes intense head injury // /////////////////////////////////////////////////////////////////////////////// class ACTION_StartHeadInjury extends P2ScriptedAction; function bool InitActionFor(ScriptedController C) { local AWDudePlayer dp; dp = AWDudePlayer(GetPlayer(C)); if (dp != None) { dp.StartHeadInjury(); } return false; }
Posted on: Thu, 17 Oct 2013 12:22:23 +0000

Trending Topics



Recently Viewed Topics




© 2015