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 |
//===================================================================== // AI_GetOutOfWayGoal //===================================================================== class AI_GetOutOfWayGoal extends AI_MovementGoal editinlinenew; //===================================================================== // Constants const DEACTIVATION_DELAY = 5; // goal deactivates after this many seconds //===================================================================== // Variables var(Parameters) Rook avoidee; // rook I'm avoiding var(Parameters) Vector aimLocation; // where the avoidee is shooting //===================================================================== // Functions overloaded function construct( AI_Resource r, int pri, Rook avoidee, Vector aimLocation ) { priority = pri; self.avoidee = avoidee; self.aimLocation = aimLocation; super.construct( r ); } //--------------------------------------------------------------------- // Called explicitly at start of gameplay function init( AI_Resource r ) { super.init( r ); // userData is always 'None' for deactivation sensors, and != None for activation sensors activationSentinel.activateSentinel( self, class'AI_GetOutOfWaySensor', characterResource(),,, self ); } //--------------------------------------------------------------------- // Setup deactivation sentinel function setUpDeactivationSentinel() { local int timerValue; // deactivate after a specified amount of time timerValue = DEACTIVATION_DELAY + AI_SensorResource( class'Setup'.static.GetStaticSensorResource() ).globalSensorAction.timer.queryIntegerValue(); deactivationSentinel.activateSentinel( self, class'AI_TimerSensor', None, timerValue, timerValue, None ); avoidee = Rook(AI_GetOutOfWaySensor(activationSentinel.sensor).value.objectData); aimLocation = AI_GetOutOfWaySensor(activationSentinel.sensor).aimLocation; //log( "====" @ resource.pawn().name @ "sticking avoidee into goal:" @ avoidee.name @ class'Pawn'.static.checkAlive(avoidee) $ ". Switch off at" @ timerValue ); } //===================================================================== defaultproperties { bInactive = true bPermanent = true priority = 60 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |