I'm a doctor, not a mechanic

Difference between revisions of "UE2:AnotherPawn"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m
m (updated due to changes to class infobox)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__TOC__
 
__TOC__
{{classbox| [[Legacy:UT2004|UT2004]] :: [[Legacy:Actor|Actor]] >> [[Legacy:Pawn|Pawn]] >> [[Legacy:UnrealPawn|UnrealPawn]] >> [[Legacy:XPawn|xPawn]] >> AnotherPawn (Custom)}}
 
  
A generic pawn that can be spawned by a [[Open_Source/Pawn_Factory|PawnFactory]].  It holds a variable of the factory that created the pawn.
+
A generic pawn that can be spawned by a [[UE2:PawnFactory|PawnFactory]].  It holds a variable of the factory that created the pawn.
  
 
==Properties==
 
==Properties==
; [[Open_Source/Pawn_Factory| Pawn Factory]] ParentFactory : The factory that created the pawn.
+
===Visible===
 +
; [[UE2:PawnFactory|PawnFactory]] ParentFactory : The factory that created the pawn.
  
 
==Functions==
 
==Functions==
; Destroyed() (simulated)
+
; Destroyed() (simulated) : Responsible for telling the pawns factory that is has been destroyed.
  
 
==Code==
 
==Code==
 +
{{Infobox class
 +
| class  = AnotherPawn
 +
| custom  = yes
 +
| parent1 = xPawn
 +
| parent2 = UnrealPawn
 +
| parent3 = Pawn
 +
| parent4 = Actor
 +
}}
 
<uscript>
 
<uscript>
 
// ============================================================================
 
// ============================================================================
Line 53: Line 61:
 
{
 
{
 
}
 
}
</uscript></div>
+
</uscript>
 +
 
 +
==Related Topics==
 +
*[[UE2:PawnFactory|PawnFactory]]

Latest revision as of 11:49, 9 May 2008

A generic pawn that can be spawned by a PawnFactory. It holds a variable of the factory that created the pawn.

Properties[edit]

Visible[edit]

PawnFactory ParentFactory 
The factory that created the pawn.

Functions[edit]

Destroyed() (simulated) 
Responsible for telling the pawns factory that is has been destroyed.

Code[edit]

UE2 Actor >> Pawn >> UnrealPawn >> xPawn >> AnotherPawn (custom)
// ============================================================================
// AnotherPawn
// Copyright (c) 2006 by Andrew Fyfe <andrew@neptune-one.net>
// This program is free software; you can redistribute and/or modify 
// it under the terms of the Lesser Open Unreal Mod License version 1.1.
//
// A generic pawn that can be spawned by a PawnFactory.
// ============================================================================
 
class AnotherPawn extends xPawn
	abstract;
 
 
// ============================================================================
// Properties
// ============================================================================
 
var	PawnFactory	ParentFactory; // The factory that created the pawn.
 
 
// ============================================================================
// Destroyed
// ============================================================================
 
simulated function Destroyed()
{
	// If we were made in a factory, tell them we're dead :(
	if ( ParentFactory != None )
		ParentFactory.PawnDestroyed( self );
 
	super.Destroyed();
}
 
 
// ============================================================================
// Defaults
// ============================================================================
 
DefaultProperties
{
}

Related Topics[edit]