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 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 |
/** event that encapsulates basic mover functionality such as activating when a player gets on/off, automatically reversing direction after * a delay, and handling hitting other actors in transit * the Originator of this event should be the mover (InterpActor or subclass), which notifies us when things we might care about happen * * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved. */ class SeqEvent_Mover extends SequenceEvent native(Sequence) hidecategories(SequenceEvent); /** how long the mover should stay open before automatically closing (reverse playback) * values <= 0.0 turn off this auto behavior and allow manual control (via the "Completed" and "Aborted" output links for the attached matinee action) */ var() float StayOpenTime; // (cpptext) // (cpptext) // (cpptext) // (cpptext) event RegisterEvent() { local InterpActor Mover; // tell the mover how long to stay after interpolation before calling NotifyFinishedOpen() Mover = InterpActor(Originator); if (Mover != None) { Mover.StayOpenTime = StayOpenTime; } } /** notification that our linked Mover has encroached on the given Actor */ function NotifyEncroachingOn(Actor Hit) { local SeqVar_Object ObjVar; local array<int> ActivateIndices; ActivateIndices[0] = 3; // specify true for bPushTop as it's important that it gets executed before the matinee action that caused the movement // as that matinee may get its direction reversed or otherwise modified if (CheckActivate(Originator, Instigator, false, ActivateIndices, true)) { // set the "Actor Hit" output variable to the actor we hit foreach LinkedVariables(class'SeqVar_Object', ObjVar, "Actor Hit") { ObjVar.SetObjectValue(Hit); } } } /** notification that an Actor has attached itself to the mover */ function NotifyAttached(Actor Other) { local array<int> ActivateIndices; // if a pawn got on the mover, and it isn't already moving, then activate if (Pawn(Other) != None && IsZero(Originator.Velocity)) { ActivateIndices[0] = 0; CheckActivate(Originator, Other, false, ActivateIndices); } } /** notification that an Actor has been detached from the mover */ function NotifyDetached(Actor Other) { local Pawn P; local array<int> ActivateIndices; // should always be true, but iterators tend to crash when accessing None so be sure if (Originator == None) { WarnInternal("Originator mover missing"); } else if (Pawn(Other) != None) { // activate the "detached" output if there are no more pawns touching the mover foreach Originator.BasedActors(class'Pawn', P) { return; } ActivateIndices[0] = 1; CheckActivate(Originator, Instigator, false, ActivateIndices); } } /** notification that the mover has completed all opening actions and is now ready to close */ function NotifyFinishedOpen() { local array<int> ActivateIndices; // activate the "open finished" link ActivateIndices[0] = 2; CheckActivate(Originator, Instigator, false, ActivateIndices); } defaultproperties { StayOpenTime=1.500000 MaxTriggerCount=0 bPlayerOnly=False OutputLinks(0)=(LinkDesc="Pawn Attached") OutputLinks(1)=(LinkDesc="Pawn Detached") OutputLinks(2)=(LinkDesc="Open Finished") OutputLinks(3)=(LinkDesc="Hit Actor") VariableLinks(1)=(ExpectedType=Class'Engine.SeqVar_Object',LinkDesc="Actor Hit",bWriteable=True,MinVars=1,MaxVars=255) ObjName="Mover" ObjCategory="Physics" Name="Default__SeqEvent_Mover" ObjectArchetype=SequenceEvent'Engine.Default__SequenceEvent' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |