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 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 |
//------------------------------------------------------------------------------ // StageTrigger. // $Author: Mfox $ // $Date: 4/30/02 12:34p $ // $Revision: 3 $ //------------------------------------------------------------------------------ class StageTrigger extends Trigger; var() name TagDec; var() name TagInc; var() int MaxKeyFrame; var() name WaterEvents[8]; var() name DispatcherTags[8]; // List of U2Dispatchers that are linked to this StageTrigger var U2Dispatcher Dispatchers[8]; var int CurrentStage; // Internal stage tracker (also acts as a keyframe for the mover we're affecting) simulated event PreBeginPlay() { local int x; local U2Dispatcher W; local Trigger T; Super.PreBeginPlay(); // Find all the U2Dispatchers that are attached to us. // for( x = 0 ; x < ArrayCount( DispatcherTags ) ; x++) { Dispatchers[x] = None; foreach AllActors( class 'U2Dispatcher', W, DispatcherTags[x] ) { Dispatchers[x] = W; break; } } } function EnableTriggers( BOOL bEnable ) { local int x; for( x = 0 ; x < ArrayCount( Dispatchers ) ; x++) { if( Dispatchers[x] != None ) { if( bEnable ) { Dispatchers[x].Enable( 'Trigger' ); } else { Dispatchers[x].Disable( 'Trigger' ); } } } } function ChangeStage( actor Other, int Delta ) { local ElevatorMover M; local WaterVolume Z; local int i; local Actor A; // If we have an Event, fire it. // TriggerActors( Self, class'Actor', Self, None, Event, true ); // Change stage value and keep it within the defined limits. // CurrentStage += Delta; if( CurrentStage < 0) { CurrentStage = 0; } if( CurrentStage > MaxKeyFrame ) { CurrentStage = MaxKeyFrame; } // Locate any matching ElevatorMovers and move them to the proper keyframe. // foreach AllActors( class 'ElevatorMover', M, Event ) { M.MoveKeyframe( CurrentStage, 1 ); } // Loop through the array of WaterVolume Tags and ... // // - if index is less then current stage, turn it off // - if index is greater than current stage, turn it on // for( i = 0; i < MaxKeyFrame + 1; i++ ) { foreach AllActors( class 'WaterVolume', Z, WaterEvents[i] ) { if( WaterEvents[i] != '' ) { if( i < CurrentStage ) { //arl-tbi Z.TriggerWaterVolume( Other, false ); } else { //arl-tbi Z.TriggerWaterVolume( Other, true ); } } } } } defaultproperties { UseReticleOnEvents(0)="UseReticleText" UseReticleOnEvents(1)="UseReticleCorners" UseReticleOnEvents(2)="UseReticleTopBars" ProximityReticleOnEvents(0)="ProximityReticleCorners" ProximityReticleOnEvents(1)="ProximityReticleTopBars" } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |