Mostly Harmless

Legacy:DestroyableObjective SM

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2004 :: Actor >> NavigationPoint >> JumpDest >> JumpSpot >> GameObjective >> DestroyableObjective >> DestroyableObjective_SM (Package: UnrealGame)

(This actor is new in UT2004)

A DestroyableObjective_SM actor works just like a general DestroyableObjective (it is a GameObjective which is completed by doing a certain amount of damage to it), except for four things:

  • It uses a static mesh as a representation of the objective in the game world.
  • It uses static mesh collision instead of cylinder collision to determine when it has been "hit".
  • It automatically changes its default static mesh to a different one when the objective has been completed (i.e. show a blown-up mesh once the object has been destroyed).
  • It can have one or more associated antiportal actors, which it will automatically disable when the objective has been destroyed (for things like doors which block visibility until they have a hole blown through them). (Note: You must set a DestroyedStaticMesh of some kind for the antiportal functionality to work properly.)

Properties

Important Properties Inherited from Actor

StaticMesh Display->StaticMesh
The static mesh displayed before the objective has been destroyed.

DestroyableObjective_SM

StaticMesh DestroyedStaticMesh
The static mesh to display after this objective has been destroyed. (If this property is None, this actor will just set bHidden=True when it gets destroyed instead.)
name AntiPortalTag
A tag used to associate one or more AntiPortalActors with this objective, which will be disabled when the objective is destroyed. Note: If the DestroyedStaticMesh property is set to None, the DestroyableObjective_SM will disappear when destroyed, but antiportal changes will not be performed (so you need to have some sort of destroyed mesh in order for associated antiportals to be disabled along with the objective). This appears to be a design flaw in the code.

(Hidden Properties)

StaticMesh OriginalMesh
Used internally to keep track of the original value of Display->StaticMesh
StaticMesh OldStaticMesh
Used in replication to tell when Display->StaticMesh has changed.
array<AntiPortalActor> AntiPortals
A generated list of all AntiPortalActors matching the AntiPortalTag.

Methods

Functions

PostBeginPlay ( ) [simulated] 
Initialize the hidden properties.
AdjustAntiPortals ( ) [simulated] 
If the original static mesh is being displayed, set all associated AntiPortalActors to be active (DrawType = DT_AntiPortal). If the DestroyedStaticMesh is shown, set all associated AntiPortals to be inactive (DrawType = DT_None).
PostNetReceive ( ) [simulated] 
If the StaticMesh property has changed, update karma-collision information for the new mesh, and call AdjustAntiPortalActors.
Reset ( ) 
Set the displayed static mesh back to the normal one.
DisableObjective (Pawn Instigator) 
Change the mesh to the DestroyedStaticMesh, update karma collision info, and call AdjustAntiPortals.
UpdatePrecacheStaticMeshes ( ) [simulated] 
Precache the DestroyedStaticMesh.

Known Subclasses

(None)