Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 |
/** * a path that opens and closes via some trigger, usually Kismet controlled * this differs from triggering a normal NavigationPoint in that the AI * considers these to always be traversible, but may need to do something before using them, * whereas normal NavigationPoints are considered off limits when Kismet toggles them off * * Copyright 1998-2011 Epic Games, Inc. All Rights Reserved. */ class TriggeredPath extends NavigationPoint placeable; /** whether the path is currently usable */ var() bool bOpen; /** the trigger, button, etc that will make this path usable */ var() Actor MyTrigger; function OnToggle(SeqAct_Toggle InAction) { if (InAction.InputLinks[0].bHasImpulse) { bOpen = true; } else if (InAction.InputLinks[1].bHasImpulse) { bOpen = false; } else if (InAction.InputLinks[2].bHasImpulse) { bOpen = !bOpen; } WorldInfo.Game.NotifyNavigationChanged(self); } event Actor SpecialHandling(Pawn Other) { local Actor TouchActor; if (bOpen || MyTrigger == None) { return self; } else { TouchActor = MyTrigger.SpecialHandling(Other); if (TouchActor == None) { TouchActor = MyTrigger; } return TouchActor; } } event bool SuggestMovePreparation(Pawn Other) { if (bOpen) { return false; } else if (MyTrigger != None && Other.Controller.ActorReachable(MyTrigger)) { // go to trigger instead if (Other.Controller.Focus == Other.Controller.MoveTarget) { Other.Controller.Focus = MyTrigger; } Other.Controller.MoveTarget = MyTrigger; Other.Controller.CurrentPath = None; Other.Controller.NextRoutePath = None; return false; } else { // wait for path to open Other.Controller.MoveTimer = 1.0; Other.Controller.bPreparingMove = true; Other.Velocity = vect(0,0,0); Other.Acceleration = vect(0,0,0); return true; } } defaultproperties { RemoteRole=ROLE_None bNoDelete=true ExtraCost=100 bSpecialMove=true } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |