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 |
class ActionBaseDevicePowerSwitch extends Scripting.Action; var() editcombotype(enumBaseDeviceLabels) Name target; var() bool bOn "If true, sets the base device's power switch to on. Else, sets it to off."; // execute latent function Variable execute() { local BaseDevice b; Super.execute(); ForEach parentScript.actorLabel(class'BaseDevice', b, target) { b.setSwitchedOn(bOn); } return None; } // editorDisplayString function editorDisplayString(out string s) { if (bOn) s = "Turn on base device "$propertyDisplayString('target'); else s = "Turn off base device "$propertyDisplayString('target'); } event function enumBaseDeviceLabels(Engine.LevelInfo level, out Array<Name> s) { local BaseDevice b; ForEach level.AllActors(class'BaseDevice', b) { if (b.label != '') { s[s.Length] = b.label; } } } defaultproperties { returnType = None actionDisplayName = "Set Base Device Power Switch" actionHelp = "Turns a base device on or off. If you turn off a base device then it will not regain power until you turn it back on, even if its power generator is knocked out and repaired." category = "Actor" } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |