Enums
Instead of passing numbers to methods or comparing numbers in Events callbacks, you can use the following Enums to do so. Examples:
-- Using Enums to figure out which StanceMode the Character is
Character.Subscribe("StanceModeChanged", function(character, old_stance, new_stance)
if (new_stance == StanceMode.Standing) then
Console.Log("I'm Standing!")
else if (new_stance == StanceMode.Crouching) then
Console.Log("I'm Crouching!")
end
end)
-- Using Enums to pass a Light Type to the constructor
local my_light = Light(Vector(-5, 0, 50), Rotator(), Color.RED, LightType.Point)
-- Using Enums to set the Character View Mode
character:SetViewMode(ViewMode.FPS)
info
The functions which use the Enums are still receiving numbers as parameters (as always), using Enums is just a facilitator.
All Enumsβ
AimMode
Label | Value | Description |
---|---|---|
AimMode.None | 0 | |
AimMode.ADS | 1 | |
AimMode.ZoomedZoom | 2 | |
AimMode.Zoomed | 3 | |
AimMode.ZoomedFar | 4 |
AnimationSlotType
Label | Value | Description |
---|---|---|
AnimationSlotType.FullBody | 0 | |
AnimationSlotType.UpperBody | 1 |
AssetType
Label | Value | Description |
---|---|---|
AssetType.Map | 2 | |
AssetType.StaticMesh | 4 | |
AssetType.SkeletalMesh | 8 | |
AssetType.Sound | 16 | |
AssetType.Animation | 32 | |
AssetType.Particle | 64 | |
AssetType.Material | 128 | |
AssetType.Blueprint | 256 |
AttachmentRule
Label | Value | Description |
---|---|---|
AttachmentRule.KeepRelative | 0 | |
AttachmentRule.KeepWorld | 1 | |
AttachmentRule.SnapToTarget | 2 |
AttenuationFunction
Label | Value | Description |
---|---|---|
AttenuationFunction.Linear | 0 | |
AttenuationFunction.Logarithmic | 1 | |
AttenuationFunction.Inverse | 2 | |
AttenuationFunction.LogReverse | 3 | |
AttenuationFunction.NaturalSound | 4 |
BlendMode
Label | Value | Description |
---|---|---|
BlendMode.Opaque | 0 | |
BlendMode.Masked | 1 | |
BlendMode.Translucent | 2 | |
BlendMode.Additive | 3 | |
BlendMode.Modulate | 4 | |
BlendMode.MaskedDistanceField | 5 | |
BlendMode.MaskedDistanceFieldShadowed | 6 | |
BlendMode.TranslucentDistanceField | 7 | |
BlendMode.TranslucentDistanceFieldShadowed | 8 | |
BlendMode.AlphaComposite | 9 | |
BlendMode.AlphaHoldout | 10 | |
BlendMode.AlphaBlend | 11 | |
BlendMode.TranslucentAlphaOnly | 12 | |
BlendMode.TranslucentAlphaOnlyWriteAlpha | 13 |
CameraMode
Label | Value | Description |
---|---|---|
CameraMode.FPSTPS | 0 | |
CameraMode.FPSOnly | 1 | |
CameraMode.TPSOnly | 2 |
CCDMode
Label | Value | Description |
---|---|---|
CCDMode.Auto | 0 | Automatically enables/disables depending on the Object size |
CCDMode.Disabled | 1 | Disables CCD |
CCDMode.Enabled | 2 | Enables CCD |
CollisionChannel
Label | Value | Description |
---|---|---|
CollisionChannel.WorldStatic | 1 << 0 | WorldStatic Object Types |
CollisionChannel.WorldDynamic | 1 << 1 | WorldDynamic Object Types |
CollisionChannel.Pawn | 1 << 2 | Capsules (usually from Characters) |
CollisionChannel.PhysicsBody | 1 << 5 | Pickables and Props Meshes |
CollisionChannel.Mesh | 1 << 17 | Character Mesh |
CollisionChannel.Water | 1 << 19 | Water Body |
CollisionChannel.Foliage | 1 << 20 | Foliage Meshes |
CollisionChannel.Vehicle | 1 << 22 | Vehicles Meshes |
CollisionType
Label | Value | Description |
---|---|---|
CollisionType.Normal | 0 | Blocks All |
CollisionType.StaticOnly | 1 | Only Blocks Static objects |
CollisionType.NoCollision | 2 | Doesn't Block anything |
CollisionType.IgnoreOnlyPawn | 3 | Blocks everything but Pawns (Characters) |
CollisionType.Auto | 4 | Automatically selects - usually will be Normal. On Props it will switch between Normal and IgnoreOnlyPawn depending on the Prop size |
CursorType
Label | Value | Description |
---|---|---|
CursorType.None | 0 | |
CursorType.Default | 1 | |
CursorType.TextEditBeam | 2 | |
CursorType.ResizeLeftRight | 3 | |
CursorType.ResizeUpDown | 4 | |
CursorType.ResizeSouthEast | 5 | |
CursorType.ResizeSouthWest | 6 | |
CursorType.CardinalCross | 7 | |
CursorType.Crosshairs | 8 | |
CursorType.Hand | 9 | |
CursorType.GrabHand | 10 | |
CursorType.GrabHandClosed | 11 | |
CursorType.SlashedCircle | 12 | |
CursorType.EyeDropper | 13 |
ConstraintMotion
Label | Value | Description |
---|---|---|
ConstraintMotion.Free | 0 | |
ConstraintMotion.Limited | 1 | |
ConstraintMotion.Locked | 2 |
DamageType
Label | Value | Description |
---|---|---|
DamageType.Shot | 0 | |
DamageType.Explosion | 1 | |
DamageType.Punch | 2 | |
DamageType.Fall | 3 | |
DamageType.RunOverProp | 4 | |
DamageType.RunOverVehicle | 5 | |
DamageType.Melee | 6 | |
DamageType.Unknown | 7 |
DatabaseEngine
Label | Value | Description |
---|---|---|
DatabaseEngine.SQLite | 0 | |
DatabaseEngine.MySQL | 1 | |
DatabaseEngine.PostgreSQL | 2 |
DifferentialType
Label | Value | Description |
---|---|---|
DifferentialType.LimitedSlip_4W | 0 | |
DifferentialType.LimitedSlip_FrontDrive | 1 | |
DifferentialType.LimitedSlip_RearDrive | 2 | |
DifferentialType.Open_4W | 3 | |
DifferentialType.Open_FrontDrive | 4 | |
DifferentialType.Open_RearDrive | 5 |
FallingMode
Label | Value | Description |
---|---|---|
FallingMode.None | 0 | |
FallingMode.Jumping | 1 | |
FallingMode.Climbing | 2 | |
FallingMode.Vaulting | 3 | |
FallingMode.Falling | 4 | |
FallingMode.HighFalling | 5 | |
FallingMode.Parachuting | 6 | |
FallingMode.SkyDiving | 7 |
FontType
Label | Value | Description |
---|---|---|
FontType.Roboto | 0 | |
FontType.GothicA1 | 1 | |
FontType.PoiretOne | 2 | |
FontType.Oswald | 3 | |
FontType.RobotoMono | 4 | |
FontType.OpenSans | 5 |
GaitMode
Label | Value | Description |
---|---|---|
GaitMode.None | 0 | |
GaitMode.Walking | 1 | |
GaitMode.Sprinting | 2 |
GrabMode
Label | Value | Description |
---|---|---|
GrabMode.Disabled | 0 | Disables grabbing |
GrabMode.Auto | 1 | Automatically enables/disables depending on the Prop size |
GrabMode.Enabled | 2 | Enables grabbing |
HighlightMode
Label | Value | Description |
---|---|---|
HighlightMode.Always | 0 | |
HighlightMode.OnlyHidden | 1 | |
HighlightMode.OnlyVisible | 2 |
HandlingMode
Label | Value | Description |
---|---|---|
HandlingMode.SingleHandedWeapon | 0 | |
HandlingMode.DoubleHandedWeapon | 1 | |
HandlingMode.SingleHandedMelee | 2 | |
HandlingMode.DoubleHandedMelee | 3 | |
HandlingMode.Throwable | 4 | |
HandlingMode.Torch | 5 | |
HandlingMode.Barrel | 6 | |
HandlingMode.Box | 7 |
ImageFormat
Label | Value | Description |
---|---|---|
ImageFormat.JPEG | 0 | |
ImageFormat.PNG | 1 | |
ImageFormat.BMP | 2 |
InputEvent
Label | Value | Description |
---|---|---|
InputEvent.Pressed | 0 | |
InputEvent.Released | 1 |
KeyModifier
Label | Value | Description |
---|---|---|
KeyModifier.None | 0 | |
KeyModifier.LeftShiftDown | 1 << 0 | |
KeyModifier.RightShiftDown | 1 << 1 | |
KeyModifier.LeftControlDown | 1 << 2 | |
KeyModifier.RightControlDown | 1 << 3 | |
KeyModifier.LeftAltDown | 1 << 4 | |
KeyModifier.RightAltDown | 1 << 5 | |
KeyModifier.LeftCommandDown | 1 << 6 | |
KeyModifier.RightCommandDown | 1 << 7 | |
KeyModifier.CapsLocked | 1 << 8 |
LightProfile
Label | Value | Description |
---|---|---|
LightProfile.None | 0 | |
LightProfile.Arrow_Star | 1 | |
LightProfile.Arrow_Up | 2 | |
LightProfile.Beam_01 | 3 | |
LightProfile.Beam_02 | 4 | |
LightProfile.Beam_03 | 5 | |
LightProfile.Beam_04 | 6 | |
LightProfile.Beam_05 | 7 | |
LightProfile.Beam_06 | 8 | |
LightProfile.Beam_07 | 9 | |
LightProfile.Beam_08 | 10 | |
LightProfile.Beam_LED_01 | 11 | |
LightProfile.Beam_LED_02 | 12 | |
LightProfile.Beam_LED_03 | 13 | |
LightProfile.Beam_LED_04 | 14 | |
LightProfile.Beam_LED_05 | 15 | |
LightProfile.Beam_LED_06 | 16 | |
LightProfile.Beam_LED_07 | 17 | |
LightProfile.Bow | 18 | |
LightProfile.Capped_01 | 19 | |
LightProfile.Capped_02 | 20 | |
LightProfile.Shattered_01 | 21 | |
LightProfile.Shattered_02 | 22 | |
LightProfile.Shattered_03 | 23 | |
LightProfile.Shattered_04 | 24 | |
LightProfile.Shattered_05 | 25 | |
LightProfile.SpotLight_01 | 26 | |
LightProfile.SpotLight_02 | 27 | |
LightProfile.SpotLight_03 | 28 | |
LightProfile.SpotLight_04 | 29 | |
LightProfile.Spreadout_01 | 30 | |
LightProfile.Spreadout_02 | 31 | |
LightProfile.Spreadout_03 | 32 | |
LightProfile.Spreadout_04 | 33 | |
LightProfile.Star_Bow | 34 | |
LightProfile.Star_Burst_01 | 35 | |
LightProfile.Star_Burst_02 | 36 | |
LightProfile.Star_Burst_03 | 37 | |
LightProfile.Star_Burst_04 | 38 | |
LightProfile.Star_Burst_05 | 39 | |
LightProfile.Star_Burst_06 | 40 | |
LightProfile.Star_Burst_07 | 41 | |
LightProfile.Star_Burst_08 | 42 | |
LightProfile.Star_X_01 | 43 | |
LightProfile.Star_X_02 | 44 | |
LightProfile.Wall_Boomerang | 45 | |
LightProfile.Wall_Inverted_V | 46 | |
LightProfile.Wall_Star_T | 47 | |
LightProfile.Wing_6 | 48 | |
LightProfile.Wing_V_01 | 49 | |
LightProfile.Wing_V_02 | 50 |
LogType
Label | Value | Description |
---|---|---|
LogType.Display | 0 | |
LogType.Warning | 1 | |
LogType.Error | 2 | |
LogType.Debug | 3 | |
LogType.Verbose | 4 | |
LogType.Scripting | 5 | |
LogType.ScriptingWarn | 6 | |
LogType.ScriptingError | 7 | |
LogType.Chat | 8 | |
LogType.WebUI | 9 | |
LogType.Success | 10 | |
LogType.Fatal | 11 |
LightType
Label | Value | Description |
---|---|---|
LightType.Point | 0 | |
LightType.Spot | 1 | |
LightType.React | 2 |
NativeWidget
Label | Value | Description |
---|---|---|
NativeWidget.Border | 0 | |
NativeWidget.Button | 1 | |
NativeWidget.CheckBox | 2 | |
NativeWidget.Image | 3 | |
NativeWidget.ProgressBar | 4 | |
NativeWidget.RichTextBlock | 5 | |
NativeWidget.Slider | 6 | |
NativeWidget.Text | 7 | |
NativeWidget.ComboBox | 8 | |
NativeWidget.EditableText | 9 | |
NativeWidget.EditableTextMultiLine | 10 | |
NativeWidget.SpinBox | 11 | |
NativeWidget.TextBox | 12 | |
NativeWidget.TextBoxMultiLine | 13 | |
NativeWidget.CanvasPanel | 14 | |
NativeWidget.GridPanel | 15 | |
NativeWidget.HorizontalBox | 16 | |
NativeWidget.Overlay | 17 | |
NativeWidget.ScaleBox | 18 | |
NativeWidget.ScrollBox | 19 | |
NativeWidget.SizeBox | 20 | |
NativeWidget.UniformGridPanel | 21 | |
NativeWidget.VerticalBox | 22 | |
NativeWidget.WrapBox | 23 | |
NativeWidget.BackgroundBlur | 24 |
SkyMode
Label | Value | Description |
---|---|---|
SkyMode.VolumetricClouds | 0 | Uses a 3D Volumetric Cloud layer |
SkyMode.StaticClouds | 1 | Designed to mimic the look of the volumetric clouds but as a static cloud texture. Much lower performance cost than volumetric clouds. |
SkyMode.DynamicClouds2D | 2 | Uses simple 2D dynamic clouds |
SkyMode.NoClouds | 3 | Disables all forms of dynamic clouds |
SkyMode.VolumetricAurora | 4 | Trades clouds for a full 3D volumetric aurora, much more convincing than the 2D effect. |
SkyMode.Space | 5 | Turns off all sky color, atmospheric scattering, clouds, etc. Specifically for environments which are set in outer space with no planet/ground beneath the camera. |
SoundType
Label | Value | Description |
---|---|---|
SoundType.SFX | 0 | |
SoundType.Music | 1 | |
SoundType.UI | 2 |
SoundLoopMode
Label | Value | Description |
---|---|---|
SoundLoopMode.Default | 0 | Default value defined in the asset |
SoundLoopMode.Forever | 1 | Overrides it to make it loop forever |
SoundLoopMode.Never | 2 | Overrides it to make it play once |
StanceMode
Label | Value | Description |
---|---|---|
StanceMode.None | 0 | |
StanceMode.Standing | 1 | |
StanceMode.Crouching | 2 | |
StanceMode.Proning | 3 |
SteeringType
Label | Value | Description |
---|---|---|
SteeringType.SingleAngle | 0 | Both wheels steer by the same amount |
SteeringType.AngleRatio | 1 | Outer wheels on corner steer less than the inner ones by set ratio |
SteeringType.Ackermann | 2 | Ackermann steering principle is applied |
SurfaceType
Label | Value | Description |
---|---|---|
SurfaceType.Default | 0 | |
SurfaceType.Carpet | 1 | |
SurfaceType.Concrete | 2 | |
SurfaceType.Grass | 3 | |
SurfaceType.Gravel | 4 | |
SurfaceType.Ground | 5 | |
SurfaceType.MetalLight | 6 | |
SurfaceType.Plastic | 7 | |
SurfaceType.Sand | 8 | |
SurfaceType.Snow | 9 | |
SurfaceType.Water | 10 | |
SurfaceType.WoodLight | 11 | |
SurfaceType.Flesh | 12 | |
SurfaceType.MetalHeavy | 13 | |
SurfaceType.WoodHeavy | 14 | |
SurfaceType.Ice | 15 | |
SurfaceType.Mud | 16 | |
SurfaceType.Rock | 17 | |
SurfaceType.Thump | 18 | |
SurfaceType.Glass | 19 | |
SurfaceType.Rubber | 20 | |
SurfaceType.Air | 21 |
SwimmingMode
Label | Value | Description |
---|---|---|
SwimmingMode.None | 0 | |
SwimmingMode.Surface | 1 | |
SwimmingMode.Underwater | 2 |
TextRenderAlignCamera
Label | Value | Description |
---|---|---|
TextRenderAlignCamera.Unaligned | 0 | |
TextRenderAlignCamera.AlignCameraRotation | 1 | |
TextRenderAlignCamera.FaceCamera | 2 |
TextRenderBevelType
Label | Value | Description |
---|---|---|
TextRenderBevelType.Linear | 0 | |
TextRenderBevelType.HalfCircle | 1 | |
TextRenderBevelType.Convex | 2 | |
TextRenderBevelType.Concave | 3 | |
TextRenderBevelType.OneStep | 4 | |
TextRenderBevelType.TwoSteps | 5 | |
TextRenderBevelType.Engraved | 6 |
TextRenderHorizontalAlignment
Label | Value | Description |
---|---|---|
TextRenderHorizontalAlignment.Left | 0 | |
TextRenderHorizontalAlignment.Center | 1 | |
TextRenderHorizontalAlignment.Right | 2 |
TextRenderVerticalAlignment
Label | Value | Description |
---|---|---|
TextRenderVerticalAlignment.Top | 0 | |
TextRenderVerticalAlignment.Center | 1 | |
TextRenderVerticalAlignment.Bottom | 2 | |
TextRenderVerticalAlignment.QuadTop | 3 |
TriggerType
Label | Value | Description |
---|---|---|
TriggerType.Sphere | 0 | |
TriggerType.Box | 1 |
TraceMode
Label | Value | Description |
---|---|---|
TraceMode.DrawDebug | 1 << 0 | Whether to draw a 3D line representing the ray |
TraceMode.TraceComplex | 1 << 1 | Whether should trace against complex collision |
TraceMode.ReturnPhysicalMaterial | 1 << 2 | Whether want to include the physical material in the results (adds SurfaceType to result) |
TraceMode.ReturnEntity | 1 << 3 | Whether want to return the Entity hit (adds Entity to result) |
TraceMode.ReturnNames | 1 << 4 | Whether should return names (adds ActorName , ComponentName and BoneName to result) |
TraceMode.ReturnUV | 1 << 5 | Whether want to trace and return UV information (adds UV to result) |
ViewMode
Label | Value | Description |
---|---|---|
ViewMode.FPS | 0 | |
ViewMode.TPS1 | 1 | |
ViewMode.TPS2 | 2 | |
ViewMode.TPS3 | 3 | |
ViewMode.TopDown | 4 |
VOIPSetting
Label | Value | Description |
---|---|---|
VOIPSetting.Local | 0 | 3D Sound |
VOIPSetting.Global | 1 | 2D Sound |
VOIPSetting.Muted | 2 |
WeatherType
Label | Value | Description |
---|---|---|
WeatherType.ClearSkies | 1 | |
WeatherType.Cloudy | 2 | |
WeatherType.Foggy | 3 | |
WeatherType.Overcast | 4 | |
WeatherType.PartlyCloudy | 5 | |
WeatherType.Rain | 6 | |
WeatherType.RainLight | 7 | |
WeatherType.RainThunderstorm | 8 | |
WeatherType.SandDustCalm | 9 | |
WeatherType.SandDustStorm | 10 | |
WeatherType.Snow | 11 | |
WeatherType.SnowBlizzard | 12 | |
WeatherType.SnowLight | 13 |
WebUIModifier
Label | Value | Description |
---|---|---|
WebUIModifier.None | 0 | |
WebUIModifier.CapsLockOn | 1 << 0 | |
WebUIModifier.ShiftDown | 1 << 1 | |
WebUIModifier.ControlDown | 1 << 2 | |
WebUIModifier.AltDown | 1 << 3 | |
WebUIModifier.LeftMouseButton | 1 << 4 | |
WebUIModifier.MiddleMouseButton | 1 << 5 | |
WebUIModifier.RightMouseButton | 1 << 6 | |
WebUIModifier.CommandDown | 1 << 7 | |
WebUIModifier.NumLockOn | 1 << 8 | |
WebUIModifier.IsKeyPad | 1 << 9 | |
WebUIModifier.IsLeft | 1 << 10 | |
WebUIModifier.IsRight | 1 << 11 | |
WebUIModifier.AltgrDown | 1 << 12 | |
WebUIModifier.IsRepeat | 1 << 13 |
WebUIKeyType
Label | Value | Description |
---|---|---|
WebUIKeyType.Down | 0 | |
WebUIKeyType.Up | 1 | |
WebUIKeyType.Char | 2 |
WebUIMouseType
Label | Value | Description |
---|---|---|
WebUIMouseType.Left | 0 | |
WebUIMouseType.Right | 1 | |
WebUIMouseType.Middle | 2 |
WidgetVisibility
Label | Value | Description |
---|---|---|
WidgetVisibility.Hidden | 0 | |
WidgetVisibility.Visible | 1 | |
WidgetVisibility.VisibleNotHitTestable | 2 |