I love the smell of UnrealEd crashing in the morning. – tarquin

Difference between revisions of "UE2:AnotherPawn"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m (Open Source/Another Pawn moved to UE2:AnotherPawn: Restructuring.)
m
Line 5: Line 5:
 
==Properties==
 
==Properties==
 
===Visible===
 
===Visible===
; [[Open_Source/Pawn_Factory| Pawn Factory]] ParentFactory : The factory that created the pawn.
+
; [[UE2:PawnFactory|PawnFactory]] ParentFactory : The factory that created the pawn.
  
 
==Functions==
 
==Functions==
Line 64: Line 64:
  
 
==Related Topics==
 
==Related Topics==
 +
*[[UE2:PawnFactory|PawnFactory]]

Revision as of 17:37, 8 April 2008

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

Properties

Visible

PawnFactory ParentFactory 
The factory that created the pawn.

Functions

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

Code

UE2 xPawn >> UnrealPawn >> Pawn >> Actor >> 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