Always snap to grid

Difference between revisions of "UE3:UT MDB GR Bloodlust (UT3)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Created page with '==Introduction== ==Code== {{Infobox class | package = UT_GDP_Newtators | class = UT_MDB_GR_Bloodlust | game = UT3 | engine = UE3 | custom = yes | parent1 = UT_MDB_GameRu…')
 
(Subobjects now go in here, makes deeper but... event notifiers should clear call stack)
 
Line 17: Line 17:
 
// Class: UT_MDB_GR_Bloodlust
 
// Class: UT_MDB_GR_Bloodlust
 
// Creation date: 18/12/2007 04:30
 
// Creation date: 18/12/2007 04:30
// Last updated: 08/09/2009 21:06
+
// Last updated: 21/03/2010 18:54
 
// Contributors: 00zX
 
// Contributors: 00zX
 
//---------------------------------------------------
 
//---------------------------------------------------
Line 25: Line 25:
 
class UT_MDB_GR_Bloodlust extends UT_MDB_GR_Vampire;
 
class UT_MDB_GR_Bloodlust extends UT_MDB_GR_Vampire;
  
function int DamageTaken(UT_GR_Info.EnemyInfo Enemy, optional pawn Injured)
+
function int ModifyDamageTaken(UT_GR_Info.EnemyInfo Enemy, optional pawn Injured)
 
{
 
{
 
if(Enemy.Type == ET_Infantry)
 
if(Enemy.Type == ET_Infantry)
 
if(UTInventoryManager(Enemy.Pawn.InvManager).HasInventoryOfClass(class'UT_GDP_Newtators.UT_TPG_VDamage') != None)
 
if(UTInventoryManager(Enemy.Pawn.InvManager).HasInventoryOfClass(class'UT_GDP_Newtators.UT_TPG_VDamage') != None)
Super.DamageTaken(Enemy, Injured);
+
return Super.ModifyDamageTaken(Enemy, Injured);
  
// return Super(UT_MDB_GameRules).DamageTaken(Enemy, Injured);
+
// return Enemy.Damage;
return Enemy.Damage;
+
return Super(UT_MDB_GR_DamageConversion).ModifyDamageTaken(Enemy, Injured);
 
}
 
}
/*
+
 
function bool OverridePickupQuery(Pawn Other, class<Inventory> ItemClass, Actor Pickup, out byte bAllowPickup)
+
defaultproperties
 
{
 
{
local UTInventoryManager InvMgr;
+
GameRulesInfo.Add((Key="Bloodlust", Value="Powerup Enabled"))
  
InvMgr = UTInventoryManager(Other.InvManager);
+
bUseSuperHealth=True
 +
bUseForVehicles=False
 +
bUseForKnights=False
 +
bUseForRooks=False
  
if(Pickup != None && UTPawn(Other) != None)
+
Begin Object Class=UT_MDB_GR_FactoryReplacer Name=UT_MDB_GR_FactoryReplacer0
{
+
ReplacerSet.Add((ReplacedGroup="FT_Powerup", ReplacedName="UTPickupFactory_UDamage", ReplacedWithName="UT_PF_VDamage", ReplacedWithPath="UT_GDP_Newtators.UT_PF_VDamage"))
if(InvMgr.HasInventoryOfClass(class'Newtators.UTVDamage') != None)
+
End Object
{
+
GameRules.Add(UT_MDB_GR_FactoryReplacer0)
if(Pickup.IsA('UTPickupFactory_HealthVial') ||
+
Pickup.IsA('UTPickupFactory_SuperHealth') ||
+
Pickup.IsA('UTPickupFactory_MediumHealth'))
+
return true;
+
}
+
}
+
  
if((NextGameRules != None) &&  NextGameRules.OverridePickupQuery(Other, ItemClass, Pickup, bAllowPickup))
+
Begin Object Class=UT_MDB_GR_ItemReplacer Name=UT_MDB_GR_ItemReplacer0
return true;
+
ReplacerSet.Add((ReplacedGroup="FT_Powerup", ReplacedName="UTUDamage", ReplacedWithClass=class'UT_GDP_Newtators.UT_TPG_VDamage'))
 
+
End Object
return false;
+
GameRules.Add(UT_MDB_GR_ItemReplacer0)
}*/
+
 
+
defaultproperties
+
{
+
bUseSuperHealth=True
+
 
}
 
}
 
</uscript>
 
</uscript>

Latest revision as of 23:08, 18 April 2010

Introduction[edit]

Code[edit]

UT3 UT_MDB >> UT_MDB_GameRules >> UT_MDB_GR_Bloodlust (custom)
Package: 
UT_GDP_Newtators

Script[edit]

//===================================================
//	Class: UT_MDB_GR_Bloodlust
//	Creation date: 18/12/2007 04:30
//	Last updated: 21/03/2010 18:54
//	Contributors: 00zX
//---------------------------------------------------
//	Attribution-Noncommercial-Share Alike 3.0 Unported
//	http://creativecommons.org/licenses/by-nc-sa/3.0/
//===================================================
class UT_MDB_GR_Bloodlust extends UT_MDB_GR_Vampire;
 
function int ModifyDamageTaken(UT_GR_Info.EnemyInfo Enemy, optional pawn Injured)
{
	if(Enemy.Type == ET_Infantry)
		if(UTInventoryManager(Enemy.Pawn.InvManager).HasInventoryOfClass(class'UT_GDP_Newtators.UT_TPG_VDamage') != None)
			return Super.ModifyDamageTaken(Enemy, Injured);
 
//	return Enemy.Damage;
	return Super(UT_MDB_GR_DamageConversion).ModifyDamageTaken(Enemy, Injured);
}
 
defaultproperties
{
	GameRulesInfo.Add((Key="Bloodlust", Value="Powerup Enabled"))
 
	bUseSuperHealth=True
	bUseForVehicles=False
	bUseForKnights=False
	bUseForRooks=False
 
	Begin Object Class=UT_MDB_GR_FactoryReplacer Name=UT_MDB_GR_FactoryReplacer0
		ReplacerSet.Add((ReplacedGroup="FT_Powerup", ReplacedName="UTPickupFactory_UDamage", ReplacedWithName="UT_PF_VDamage", ReplacedWithPath="UT_GDP_Newtators.UT_PF_VDamage"))
	End Object
	GameRules.Add(UT_MDB_GR_FactoryReplacer0)
 
	Begin Object Class=UT_MDB_GR_ItemReplacer Name=UT_MDB_GR_ItemReplacer0
		ReplacerSet.Add((ReplacedGroup="FT_Powerup", ReplacedName="UTUDamage", ReplacedWithClass=class'UT_GDP_Newtators.UT_TPG_VDamage'))
	End Object
	GameRules.Add(UT_MDB_GR_ItemReplacer0)
}