I don't need to test my programs. I have an error-correcting modem.

Legacy:TouchableObjective

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2003 >> Actor >> NavigationPoint >> JumpDest >> JumpSpot >> GameObjective >> TouchableObjective

A TouchableObjective must be touched by a player of the attacking team (the team that's not the one specified by the DefenderTeamIndex property) to be disabled. In other words, it more or less acts as a TriggeredObjective with a TeamTrigger built in.

Usage[edit]

You'll find TouchableObjective in the actor browser then. Its code will automatically be saved with your map when you save it.

See Embedding Code for more information.

Source[edit]

</span><div class="hidden">// ============================================================================
// TouchableObjective
// Copyright 2002 by Mychaeel <mychaeel@planetjailbreak.com>
// $Id: TouchableObjective.uc,v 1.2 2003/01/03 15:40:52 mychaeel Exp $
//
// GameObjective that must be touched to be disabled. TriggeredObjective
// requires an additional trigger for that.
//
// Originally developed for Jailbreak mapping support.
// ============================================================================
 
 
class TouchableObjective extends GameObjective
  placeable;
 
 
// ============================================================================
// DisableObjective
//
// Disables this objective if instigated by a player not of the defending team.
// ============================================================================
 
function DisableObjective(Pawn PawnInstigator) {
 
  if (PawnInstigator                            == None ||
      PawnInstigator.PlayerReplicationInfo      == None ||
      PawnInstigator.PlayerReplicationInfo.Team == None ||
      PawnInstigator.PlayerReplicationInfo.Team.TeamIndex == DefenderTeamIndex)
    return;
 
  SetCollision(False, False, False);
 
  Super.DisableObjective(PawnInstigator);
  }
 
 
// ============================================================================
// Reset
//
// Resets this actor to its default state. Restores its collision properties.
// ============================================================================
 
function Reset() {
 
  Super.Reset();
 
  SetCollision(Default.bCollideActors,  // resetting the collision will
               Default.bBlockActors,    // implicitly call Touch again if a
               Default.bBlockPlayers);  // player is still touching this actor
  }
 
 
// ============================================================================
// Touch
//
// Disables this objective when touched by a player.
// ============================================================================
 
event Touch(Actor ActorOther) {
 
  if (Pawn(ActorOther) != None)
    DisableObjective(Pawn(ActorOther));
  }
 
 
// ============================================================================
// Defaults
// ============================================================================
 
defaultproperties {
 
  bCollideActors = True;
  bBlockActors  = False;
  bBlockPlayers = False;
  }