|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
− | {{classbox| [[Legacy:UT2004|UT2004]] :: [[Legacy:Actor|Actor]] >> [[Legacy:Pawn|Pawn]] >> [[Legacy:UnrealPawn|UnrealPawn]] >> [[Legacy:XPawn|xPawn]] >> AnotherPawn (Custom)}}
| + | #REDIRECT [[Open Source/Another Pawn]] |
− | | + | |
− | A generic pawn that can be spawned by a [[Legacy:Fyfe/PawnFactory|PawnFactory]].
| + | |
− | | + | |
− | ==Properties==
| + | |
− | | + | |
− | ===Main===
| + | |
− | ; [[Legacy:Fyfe/PawnFactory|PawnFactory]] ParentFactory : The factory that created the pawn.
| + | |
− | | + | |
− | ==Functions==
| + | |
− | ; Destroyed() (simulated)
| + | |
− | | + | |
− | ==Code==
| + | |
− | | + | |
− | <div class="hidden-block"><span class="hint"></span><div class="hidden">
| + | |
− | <uscript>
| + | |
− | // ============================================================================
| + | |
− | // 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
| + | |
− | {
| + | |
− | }
| + | |
− | </uscript></div></div>
| + | |
− | | + | |
− | ==Discussion==
| + | |
− | | + | |
− | '''fyfe:''' Doesn't do anything fancy just adds a variable to hold the factory that created the pawn.
| + | |
− | | + | |
− | [[Category:Legacy Custom Class|{{PAGENAME}}]]
| + | |