Skip to main content
Version: latest - a1.7.0 βš–οΈ

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
Package.Log("I'm Standing!")
else if (new_stance == StanceMode.Crouching) then
Package.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​

LabelValue
AimMode.None0
AimMode.ADS1
AimMode.ZoomedZoom2
AimMode.Zoomed3
AimMode.ZoomedFar4

AnimationSlotType​

LabelValue
AnimationSlotType.FullBody0
AnimationSlotType.UpperBody1

AttachmentRule​

LabelValue
AttachmentRule.KeepRelative0
AttachmentRule.KeepWorld1
AttachmentRule.SnapToTarget2

AttenuationFunction​

LabelValue
AttenuationFunction.Linear0
AttenuationFunction.Logarithmic1
AttenuationFunction.Inverse2
AttenuationFunction.LogReverse3
AttenuationFunction.NaturalSound4

BlendMode​

LabelValue
BlendMode.Opaque0
BlendMode.Masked1
BlendMode.Translucent2
BlendMode.Additive3
BlendMode.Modulate4
BlendMode.AlphaComposite5
BlendMode.AlphaHoldout6

CameraMode​

LabelValue
CameraMode.FPSTPS0
CameraMode.FPSOnly1
CameraMode.TPSOnly2

CollisionChannel​

LabelValueDescription
CollisionChannel.WorldStatic1 << 0WorldStatic Object Types
CollisionChannel.WorldDynamic1 << 1WorldDynamic Object Types
CollisionChannel.Pawn1 << 2Capsules (usually from Characters)
CollisionChannel.PhysicsBody1 << 5Pickables and Props Meshes
CollisionChannel.Vehicle1 << 22Vehicles Meshes
CollisionChannel.TracePrimitive1 << 16Interactable Spheres, Damage Primitives (mainly internal use)
CollisionChannel.Mesh1 << 17Character Mesh
CollisionChannel.Foliage1 << 20Foliage Meshes

CollisionType​

LabelValueDescription
CollisionType.Normal0Blocks All
CollisionType.StaticOnly1Only Blocks Static objects
CollisionType.NoCollision2Doesn't Block anything
CollisionType.IgnoreOnlyPawn3Blocks everything but Pawns (Characters)
CollisionType.Auto4Automatically selects - usually will be Normal. On Props it will switch between Normal and IgnoreOnlyPawn depending on the Prop size

CursorType​

LabelValue
CursorType.None0
CursorType.Default1
CursorType.TextEditBeam2
CursorType.ResizeLeftRight3
CursorType.ResizeUpDown4
CursorType.ResizeSouthEast5
CursorType.ResizeSouthWest6
CursorType.CardinalCross7
CursorType.Crosshairs8
CursorType.Hand9
CursorType.GrabHand10
CursorType.GrabHandClosed11
CursorType.SlashedCircle12
CursorType.EyeDropper13

ConstraintMotion​

LabelValue
ConstraintMotion.Free0
ConstraintMotion.Limited1
ConstraintMotion.Locked2

DamageType​

LabelValue
DamageType.Shot0
DamageType.Explosion1
DamageType.Punch2
DamageType.Fall3
DamageType.RunOverProp4
DamageType.RunOverVehicle5
DamageType.Unknown6

DatabaseEngine​

LabelValue
DatabaseEngine.SQLite0
DatabaseEngine.MySQL1
DatabaseEngine.PostgreSQL2

DifferentialType​

LabelValue
DifferentialType.LimitedSlip_4W0
DifferentialType.LimitedSlip_FrontDrive1
DifferentialType.LimitedSlip_RearDrive2
DifferentialType.Open_4W3
DifferentialType.Open_FrontDrive4
DifferentialType.Open_RearDrive5

FallingMode​

LabelValue
FallingMode.None0
FallingMode.Jumping1
FallingMode.Climbing2
FallingMode.Vaulting3
FallingMode.Falling4
FallingMode.HighFalling5
FallingMode.Parachuting6
FallingMode.SkyDiving7

FontType​

LabelValue
FontType.Roboto0
FontType.GothicA11
FontType.PoiretOne2
FontType.Oswald3
FontType.RobotoMono4
FontType.OpenSans5

GaitMode​

LabelValue
GaitMode.None0
GaitMode.Walking1
GaitMode.Sprinting2

HighlightMode​

LabelValue
HighlightMode.Always0
HighlightMode.OnlyHidden1
HighlightMode.OnlyVisible2

HandlingMode​

LabelValue
HandlingMode.SingleHandedWeapon0
HandlingMode.DoubleHandedWeapon1
HandlingMode.SingleHandedMelee2
HandlingMode.DoubleHandedMelee3
HandlingMode.Throwable4
HandlingMode.Torch5
HandlingMode.Barrel6
HandlingMode.Box7

InputEvent​

LabelValue
InputEvent.Pressed0
InputEvent.Released1

LightProfile​

LabelValue
None0
Arrow_Star1
Arrow_Up2
Beam_013
Beam_024
Beam_035
Beam_046
Beam_057
Beam_068
Beam_079
Beam_0810
Beam_LED_0111
Beam_LED_0212
Beam_LED_0313
Beam_LED_0414
Beam_LED_0515
Beam_LED_0616
Beam_LED_0717
Bow18
Capped_0119
Capped_0220
Shattered_0121
Shattered_0222
Shattered_0323
Shattered_0424
Shattered_0525
SpotLight_0126
SpotLight_0227
SpotLight_0328
SpotLight_0429
Spreadout_0130
Spreadout_0231
Spreadout_0332
Spreadout_0433
Star_Bow34
Star_Burst_0135
Star_Burst_0236
Star_Burst_0337
Star_Burst_0438
Star_Burst_0539
Star_Burst_0640
Star_Burst_0741
Star_Burst_0842
Star_X_0143
Star_X_0244
Wall_Boomerang45
Wall_Inverted_V46
Wall_Star_T47
Wing_648
Wing_V_0149
Wing_V_0250

LogType​

LabelValue
LogType.Display0
LogType.Warning1
LogType.Error2
LogType.Debug3
LogType.Verbose4
LogType.Scripting5
LogType.ScriptingWarn6
LogType.ScriptingError7
LogType.Chat8
LogType.WebUI9
LogType.Success10
LogType.Fatal11

LightType​

LabelValue
LightType.Point0
LightType.Spot1
LightType.React2

SoundType​

LabelValue
SoundType.SFX0
SoundType.Music1

SoundLoopMode​

LabelValue
SoundLoopMode.Default0
SoundLoopMode.Forever1
SoundLoopMode.Never2

StanceMode​

LabelValue
StanceMode.None0
StanceMode.Standing1
StanceMode.Crouching2
StanceMode.Proning3

SurfaceType​

LabelValue
SurfaceType.Default0
SurfaceType.Carpet1
SurfaceType.Concrete2
SurfaceType.Grass3
SurfaceType.Gravel4
SurfaceType.Ground5
SurfaceType.MetalLight6
SurfaceType.Plastic7
SurfaceType.Sand8
SurfaceType.Snow9
SurfaceType.Water10
SurfaceType.WoodLight11
SurfaceType.Flesh12
SurfaceType.MetalHeavy13
SurfaceType.WoodHeavy14
SurfaceType.Ice15
SurfaceType.Mud16
SurfaceType.Rock17
SurfaceType.Thump18
SurfaceType.Glass19

SwimmingMode​

LabelValue
SwimmingMode.None0
SwimmingMode.Surface1
SwimmingMode.Underwater2

TextRenderAlignCamera​

LabelValue
TextRenderAlignCamera.Unaligned0
TextRenderAlignCamera.AlignCameraRotation1
TextRenderAlignCamera.FaceCamera2

TextRenderBevelType​

LabelValue
TextRenderBevelType.Linear0
TextRenderBevelType.HalfCircle1
TextRenderBevelType.Convex2
TextRenderBevelType.Concave3
TextRenderBevelType.OneStep4
TextRenderBevelType.TwoSteps5
TextRenderBevelType.Engraved6

TextRenderHorizontalAlignment​

LabelValue
TextRenderHorizontalAlignment.Left0
TextRenderHorizontalAlignment.Center1
TextRenderHorizontalAlignment.Right2

TextRenderVerticalAlignment​

LabelValue
TextRenderVerticalAlignment.Top0
TextRenderVerticalAlignment.Center1
TextRenderVerticalAlignment.Bottom2
TextRenderVerticalAlignment.QuadTop3

TriggerType​

LabelValue
TriggerType.Sphere0
TriggerType.Box1

ViewMode​

LabelValue
ViewMode.FPS0
ViewMode.TPS11
ViewMode.TPS22
ViewMode.TPS33
ViewMode.TopDown4

VOIPSetting​

LabelValue
VOIPSetting.Local0
VOIPSetting.Global1
VOIPSetting.Muted2

WeatherType​

LabelValue
WeatherType.Clear0
WeatherType.Rain1
WeatherType.Cloudy2
WeatherType.Thunderstorm3