| Home Page | Recent Changes | Preferences

BlockedPath

UT :: Actor (UT) >> NavigationPoint (UT) >> BlockedPath (Package: BotPack)
UT2003 :: Actor >> NavigationPoint >> BlockedPath (Package: GamePlay)

The BlockedPath actor works by telling the AI of Pawns in the level that it is extremely inadvisable to set a course that leads through this point in the navigation network. This is done by setting an ExtraCost value of precisely 100,000,000 in the BlockedPath's properties. However, a BlockedPath can be unblocked simply by triggering it. While this is of no consequence to players, it is of much use to mappers who are trying to get good bot support into their levels, and is often used in Assault maps.

Extending

Unfortunately a BlockedPath is an one-way actor; once it is triggered, there is no way to make it blocked again. However, it would be simple enough to create a two-way BlockedPath with just a few lines of UnrealScript, and it even works. Also note that setting a path node's ExtraCost to anything less than said 100,000,000 doesn't reliably prevent bots from using this path. (...fill in detailed description here.)

The code necessary to make a BlockedPath actor that can be toggled follows below. Create A Subclass explains how to add this to a map.

class BlockablePath extends NavigationPoint

var() bool bInitiallyActive

function Trigger( actor Other, pawn EventInstigator )
{
     bInitiallyActive=!bInitiallyActive;

     if (bInitiallyActive)
         ExtraCost=100000000;
     else
         ExtraCost=0;
 }

 function PostBeginPlay()
 {
     if (bInitiallyActive)
         ExtraCost=100000000;
     else
         ExtraCost=0;
 }

Related Topics


Category Class (UT)
Category Class (UT2003)
Category Class (UT2004)
Category Custom Class

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In