Core.Object | +--Engine.Actor | +--Engine.Inventory | +--XIIIMP.MarioSuperBonus | +--XIIIMP.Invulnerability
Pawn
MyPawn
simulated
GiveTo(Pawn Other)
//__________________________________________________________________________
00001 //----------------------------------------------------------- 00002 // 00003 //----------------------------------------------------------- 00004 class Invulnerability extends MarioSuperBonus; 00005 00006 var Pawn MyPawn; 00007 00008 //__________________________________________________________________________ 00009 00010 simulated event Destroyed() 00011 { 00012 MyPawn.Controller.bGodMode = false; 00013 RemoveIconInPlayerHud(); 00014 super.Destroyed(); 00015 } 00016 00017 //__________________________________________________________________________ 00018 00019 simulated function GiveTo( pawn Other ) 00020 { 00021 Super.GiveTo(other); 00022 MyPawn = Other; 00023 MyPawn.Controller.bGodMode = true; 00024 00025 AddIconInPlayerHud( Other ); 00026 SetTimer(0.1,true); 00027 SetTimer2(15.0,false); 00028 } 00029 00030 //__________________________________________________________________________ 00031 00032 event Timer2() 00033 { 00034 SetTimer( 0.0,false ); 00035 SetTimer2( 0.0,false ); 00036 00037 Destroy(); 00038 } 00039 00040 //__________________________________________________________________________ 00041 00042 00043 00044 00045 00046 defaultproperties 00047 { 00048 BonusIconId=1 00049 }