|
Variables |
int |
ExtraCost
Extra weight added by level designer |
name |
ForcedPaths[4]
list of names of NavigationPoints which should always be connected from this path |
name |
ProscribedPaths[4]
list of names of NavigationPoints which should never be connected from this path |
bool |
bAlreadyTargeted
targeted by a basesoldier |
bool |
bAutoBuilt
placed during execution of "PATHS BUILD" |
bool |
bAutoPlaced
placed as marker for another object during a paths define |
bool |
bBlocked
this path is currently unuseable |
bool |
bEndPoint
used by C++ navigation code |
bool |
bNeverUseStrafing
shouldn't use bAdvancedTactics going to this point |
bool |
bNoAutoConnect
don't connect this path to others except with special conditions (used by LiftCenter, for example) |
bool |
bOneWayPath
reachspecs from this path only in the direction the path is facing (180 degrees) |
bool |
bPathsChanged
used for incremental path rebuilding in the editor |
bool |
bPropagatesSound
this navigation point can be used for sound propagation (around corners) |
bool |
bSpecialCost
if true, navigation code will call SpecialCost function for this navigation point |
int |
bestPathWeight
list of names of NavigationPoints which should always be connected from this path |
int |
cost
added cost to visit this pathnode |
int |
newPathList[3]
index of reachspecs (used by C++ Navigation code) |
NavigationPoint |
nextNavigationPoint
list of names of NavigationPoints which should always be connected from this path |
NavigationPoint |
nextOrdered
for internal use during route searches |
NavigationPoint |
prevOrdered
for internal use during route searches |
NavigationPoint |
previousPath
for internal use during route searches |
bool |
taken
set when a creature is occupying this spot |
int |
visitedWeight
list of names of NavigationPoints which should always be connected from this path |
|
Function Summary |
void |
MoverClosed() |
void |
MoverOpened()
/* MoverOpened() & MoverClosed() used by NavigationPoints associated with movers */ |
bool |
ProceedWithMove(Pawn Other)
/* ProceedWithMove()
Called by Controller to see if move is now possible when a mover reports to the waiting
pawn that it has completed its move
*/ |
Source Code
00001 //=============================================================================
00002 // NavigationPoint.
00003 //
00004 // NavigationPoints are organized into a network to provide AIControllers
00005 // the capability of determining paths to arbitrary destinations in a level
00006 //
00007 //=============================================================================
00008 class NavigationPoint extends Actor
00009 hidecategories(Lighting,LightColor,Force)
00010 native
00011 noexport;
00012
00013 #exec Texture Import File=Textures\S_Pickup.pcx Name=S_Pickup Mips=Off MASKED=1 COMPRESS=DXT1
00014 #exec Texture Import File=Textures\SpwnAI.pcx Name=S_NavP Mips=Off MASKED=1 COMPRESS=DXT1
00015 #exec Texture Import File=Textures\SubActionGameSpeed.pcx Name=SubActionGameSpeed Mips=Off COMPRESS=DXT1
00016 #exec Texture Import File=Textures\LookTarget.pcx Name=S_LookTarget Mips=Off MASKED=1 COMPRESS=DXT1
00017 #exec Texture Import File=Textures\ActionCamMove.pcx Name=S_ActionCamMove Mips=Off COMPRESS=DXT1
00018 #exec Texture Import File=Textures\ActionCamPause.pcx Name=S_ActionCamPause Mips=Off COMPRESS=DXT1
00019
00020 // not used currently
00021 #exec Texture Import File=Textures\SiteLite.pcx Name=S_Alarm Mips=Off MASKED=1 COMPRESS=DXT1
00022
00023 //------------------------------------------------------------------------------
00024 // NavigationPoint variables
00025 var transient const int newPathList[3]; //index of reachspecs (used by C++ Navigation code)
00026 //var const array<ReachSpec> PathList; //index of reachspecs (used by C++ Navigation code)
00027 var() name ProscribedPaths[4]; // list of names of NavigationPoints which should never be connected from this path
00028 var() name ForcedPaths[4]; // list of names of NavigationPoints which should always be connected from this path
00029 var int visitedWeight;
00030 var const int bestPathWeight;
00031 var const NavigationPoint nextNavigationPoint;
00032 var const NavigationPoint nextOrdered; // for internal use during route searches
00033 var const NavigationPoint prevOrdered; // for internal use during route searches
00034 var const NavigationPoint previousPath;
00035 var int cost; // added cost to visit this pathnode
00036 var() int ExtraCost; // Extra weight added by level designer
00037
00038 var bool bEndPoint; // used by C++ navigation code
00039 var bool bSpecialCost; // if true, navigation code will call SpecialCost function for this navigation point
00040 var bool taken; // set when a creature is occupying this spot
00041 var() bool bBlocked; // this path is currently unuseable
00042 var() bool bPropagatesSound; // this navigation point can be used for sound propagation (around corners)
00043 var() bool bOneWayPath; // reachspecs from this path only in the direction the path is facing (180 degrees)
00044 var() bool bNeverUseStrafing; // shouldn't use bAdvancedTactics going to this point
00045 var const bool bAutoBuilt; // placed during execution of "PATHS BUILD"
00046 var bool bSpecialMove; // if true, pawn will call SuggestMovePreparation() when moving toward this node
00047 var bool bNoAutoConnect; // don't connect this path to others except with special conditions (used by LiftCenter, for example)
00048 var const bool bNotBased; // used by path builder - if true, no error reported if node doesn't have a valid base
00049 var const bool bAutoPlaced; // placed as marker for another object during a paths define
00050 var const bool bPathsChanged; // used for incremental path rebuilding in the editor
00051 var bool bAlreadyTargeted; //targeted by a basesoldier
00052
00053 //event int SpecialCost(Pawn Seeker);
00054
00055 // Accept an actor that has teleported in.
00056 // used for random spawning and initial placement of creatures
00057 event bool Accept( actor Incoming, actor Source )
00058 {
00059 // Move the actor here.
00060 taken = Incoming.SetLocation( Location );
00061 if (taken)
00062 {
00063 Incoming.Velocity = vect(0,0,0);
00064 Incoming.SetRotation(Rotation);
00065 }
00066 Level.Game.PlayTeleportEffect(Incoming, true, false);
00067 TriggerEvent(Event, self, Pawn(Incoming));
00068 return taken;
00069 }
00070
00071 /* SuggestMovePreparation()
00072 Optionally tell Pawn any special instructions to prepare for moving to this goal
00073 (called by Pawn.PrepareForMove() if this node's bSpecialMove==true
00074 */
00075 event bool SuggestMovePreparation(Pawn Other)
00076 {
00077 return false;
00078 }
00079
00080 /* ProceedWithMove()
00081 Called by Controller to see if move is now possible when a mover reports to the waiting
00082 pawn that it has completed its move
00083 */
00084 function bool ProceedWithMove(Pawn Other)
00085 {
00086 return true;
00087 }
00088
00089 /* MoverOpened() & MoverClosed() used by NavigationPoints associated with movers */
00090 function MoverOpened();
00091 function MoverClosed();
00092
00093 event int SpecialCost(Pawn Seeker)
00094 {
00095 return 10000;
00096 }
00097
00098 defaultproperties
00099 {
00100 bPropagatesSound=True
00101 bStatic=True
00102 bHidden=True
00103 bInteractive=False
00104 bCollideWhenPlacing=True
00105 bCanSeeThrough=True
00106 bCanShootThroughWithRayCastingWeapon=True
00107 bCanShootThroughWithProjectileWeapon=True
00108 Texture=Texture'Engine.S_NavP'
00109 CollisionRadius=80.000000
00110 CollisionHeight=100.000000
00111 }
|
End Source Code