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 |
//===================================================================== // AI_TestSensorActionB // Test Class for sentinels (sensors that monitor for goal activation/deactivation) //===================================================================== class AI_TestSensorActionB extends AI_SensorMovementAction; //===================================================================== // Variables. var AI_TestSentinelA sentinel1; var AI_TestSentinelB sentinel2; //===================================================================== // Functions. //--------------------------------------------------------------------- // set up the sensors this action may update // (can't do this in constructor because this class isn't known at // compile time when AI_Resource postBeginPlay new's sensorActions) function setupSensors( AI_Resource resource ) { // construct all sensors, add them to resource's sensor list sentinel1 = AI_TestSentinelA(addSensorClass( class'AI_TestSentinelA' )); sentinel2 = AI_TestSentinelB(addSensorClass( class'AI_TestSentinelB' )); // repeat if there are more sensors this sensorAction updates } //--------------------------------------------------------------------- state Running { Begin: sentinel1.setIntegerValue( -5 ); sentinel2.setIntegerValue( -10 ); while ( true ) { sentinel1.setIntegerValue( sentinel1.value.integerData + 1 ); log( "AI_TestSentinelA says value is" @ sentinel1.value.integerData ); sentinel2.setIntegerValue( sentinel2.value.integerData + 1 ); log("AI_TestSentinelB says value is " $ sentinel2.value.integerData); sleep(3.0); } } //===================================================================== defaultproperties { } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |