Skip to main content
Version: bleeding-edge 🩸

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

LabelValueDescription
AimMode.None0
AimMode.ADS1
AimMode.ZoomedZoom2
AimMode.Zoomed3
AimMode.ZoomedFar4

AnimationSlotType

LabelValueDescription
AnimationSlotType.FullBody0
AnimationSlotType.UpperBody1

AssetType

LabelValueDescription
AssetType.Map2
AssetType.StaticMesh4
AssetType.SkeletalMesh8
AssetType.Sound16
AssetType.Animation32
AssetType.Particle64
AssetType.Material128
AssetType.Blueprint256

AttachmentRule

LabelValueDescription
AttachmentRule.KeepRelative0
AttachmentRule.KeepWorld1
AttachmentRule.SnapToTarget2

AttenuationFunction

LabelValueDescription
AttenuationFunction.Linear0
AttenuationFunction.Logarithmic1
AttenuationFunction.Inverse2
AttenuationFunction.LogReverse3
AttenuationFunction.NaturalSound4

BlendMode

LabelValueDescription
BlendMode.Opaque0
BlendMode.Masked1
BlendMode.Translucent2
BlendMode.Additive3
BlendMode.Modulate4
BlendMode.MaskedDistanceField5
BlendMode.MaskedDistanceFieldShadowed6
BlendMode.TranslucentDistanceField7
BlendMode.TranslucentDistanceFieldShadowed8
BlendMode.AlphaComposite9
BlendMode.AlphaHoldout10
BlendMode.AlphaBlend11
BlendMode.TranslucentAlphaOnly12
BlendMode.TranslucentAlphaOnlyWriteAlpha13

CameraMode

LabelValueDescription
CameraMode.FPSTPS0
CameraMode.FPSOnly1
CameraMode.TPSOnly2

CCDMode

LabelValueDescription
CCDMode.Auto0Automatically enables/disables depending on the Object size
CCDMode.Disabled1Disables CCD
CCDMode.Enabled2Enables CCD

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.Mesh1 << 17Character Mesh
CollisionChannel.Water1 << 19Water Body
CollisionChannel.Foliage1 << 20Foliage Meshes
CollisionChannel.Vehicle1 << 22Vehicles 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

LabelValueDescription
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

LabelValueDescription
ConstraintMotion.Free0
ConstraintMotion.Limited1
ConstraintMotion.Locked2

DamageType

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

DatabaseEngine

LabelValueDescription
DatabaseEngine.SQLite0
DatabaseEngine.MySQL1
DatabaseEngine.PostgreSQL2

DifferentialType

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

FallingMode

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

FontType

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

GaitMode

LabelValueDescription
GaitMode.None0
GaitMode.Walking1
GaitMode.Sprinting2

GrabMode

LabelValueDescription
GrabMode.Disabled0Disables grabbing
GrabMode.Auto1Automatically enables/disables depending on the Prop size
GrabMode.Enabled2Enables grabbing

HighlightMode

LabelValueDescription
HighlightMode.Always0
HighlightMode.OnlyHidden1
HighlightMode.OnlyVisible2

HandlingMode

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

InputEvent

LabelValueDescription
InputEvent.Pressed0
InputEvent.Released1

LightProfile

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

LogType

LabelValueDescription
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

LabelValueDescription
LightType.Point0
LightType.Spot1
LightType.React2

SoundType

LabelValueDescription
SoundType.SFX0
SoundType.Music1
SoundType.UI2

SoundLoopMode

LabelValueDescription
SoundLoopMode.Default0
SoundLoopMode.Forever1
SoundLoopMode.Never2

StanceMode

LabelValueDescription
StanceMode.None0
StanceMode.Standing1
StanceMode.Crouching2
StanceMode.Proning3

SurfaceType

LabelValueDescription
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
SurfaceType.Rubber20
SurfaceType.Air21

SwimmingMode

LabelValueDescription
SwimmingMode.None0
SwimmingMode.Surface1
SwimmingMode.Underwater2

TextRenderAlignCamera

LabelValueDescription
TextRenderAlignCamera.Unaligned0
TextRenderAlignCamera.AlignCameraRotation1
TextRenderAlignCamera.FaceCamera2

TextRenderBevelType

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

TextRenderHorizontalAlignment

LabelValueDescription
TextRenderHorizontalAlignment.Left0
TextRenderHorizontalAlignment.Center1
TextRenderHorizontalAlignment.Right2

TextRenderVerticalAlignment

LabelValueDescription
TextRenderVerticalAlignment.Top0
TextRenderVerticalAlignment.Center1
TextRenderVerticalAlignment.Bottom2
TextRenderVerticalAlignment.QuadTop3

TriggerType

LabelValueDescription
TriggerType.Sphere0
TriggerType.Box1

TraceMode

LabelValueDescription
TraceMode.DrawDebug1 << 0Whether to draw a 3D line representing the ray
TraceMode.TraceComplex1 << 1Whether should trace against complex collision
TraceMode.ReturnPhysicalMaterial1 << 2Whether want to include the physical material in the results (adds SurfaceType to result)
TraceMode.ReturnEntity1 << 3Whether want to return the Entity hit (adds Entity to result)
TraceMode.ReturnNames1 << 4Whether should return names (adds ActorName, ComponentName and BoneName to result)
TraceMode.ReturnUV1 << 5Whether want to trace and return UV information (adds UV to result)

ViewMode

LabelValueDescription
ViewMode.FPS0
ViewMode.TPS11
ViewMode.TPS22
ViewMode.TPS33
ViewMode.TopDown4

VOIPSetting

LabelValueDescription
VOIPSetting.Local03D Sound
VOIPSetting.Global12D Sound
VOIPSetting.Muted2

WeatherType

LabelValueDescription
WeatherType.Clear0
WeatherType.Rain1
WeatherType.Cloudy2
WeatherType.Thunderstorm3

WebUIModifier

LabelValueDescription
WebUIModifier.None0
WebUIModifier.CapsLockOn1 << 0
WebUIModifier.ShiftDown1 << 1
WebUIModifier.ControlDown1 << 2
WebUIModifier.AltDown1 << 3
WebUIModifier.LeftMouseButton1 << 4
WebUIModifier.MiddleMouseButton1 << 5
WebUIModifier.RightMouseButton1 << 6
WebUIModifier.CommandDown1 << 7
WebUIModifier.NumLockOn1 << 8
WebUIModifier.IsKeyPad1 << 9
WebUIModifier.IsLeft1 << 10
WebUIModifier.IsRight1 << 11
WebUIModifier.AltgrDown1 << 12
WebUIModifier.IsRepeat1 << 13

WebUIKeyType

LabelValueDescription
WebUIKeyType.Down0
WebUIKeyType.Up1
WebUIKeyType.Char2

WebUIMouseType

LabelValueDescription
WebUIMouseType.Left0
WebUIMouseType.Right1
WebUIMouseType.Middle2