Ir para o conteúdo principal
Version: latest - a1.65.x ⚖️

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("StanceModeChange", 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

🧑‍💻API Source
This page is auto-generated! The Functions, Properties and Events described here are defined in our GitHub's API Repository! Feel free to commit suggestions and changes to the source .json API files!

AimMode

Used by Characters to change the Aiming Mode while holding Weapons

Used by Character.GetWeaponAimMode, Character.SetWeaponAimMode, Character WeaponAimModeChange Event, Character WeaponAimModeChange Event.

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

AnimationSlotType

Used by Character.PlayAnimation, Melee.AddAnimationCharacterUse.

LabelValueDescription
AnimationSlotType.FullBody0
AnimationSlotType.UpperBody1

AssetType

Used by Assets.GetAssetPath, Assets.Precache.

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

AttachmentRule

Used by Actor.AttachTo.

LabelValueDescription
AttachmentRule.KeepRelative0Will keep the current relative position/rotation if already attached.
AttachmentRule.KeepWorld1Will calculate the new relative position/rotation so the Actor stays at the same position after being attached.
AttachmentRule.SnapToTarget2Will set the Actor to the same position/rotation as the parent actor (or at the bone location) and reset its relative position/rotation to zero.

AttenuationFunction

Used by Sound Normal, WebUI.SpawnSound.

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

BlendMode

Used by Canvas.DrawBox, Canvas.DrawLine, Canvas.DrawMaterial, Canvas.DrawMaterialFromSceneCapture, Canvas.DrawMaterialFromWebUI, Canvas.DrawPolygon, Canvas.DrawRect, Canvas.DrawTexture.

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

Used by Character.GetCameraMode, Character.SetCameraMode.

LabelValueDescription
CameraMode.FPSTPS0
CameraMode.FPSOnly1
CameraMode.TPSOnly2

CCDMode

Used by Prop Default Constructor.

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

CollisionChannel

💡TIP
This Enum supports Bitwise Operations!

Used by Trace.BoxMulti, Trace.BoxSingle, Trace.CapsuleMulti, Trace.CapsuleSingle, Trace.LineMulti, Trace.LineSingle, Trace.SphereMulti, Trace.SphereSingle.

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

Used by Actor.GetCollision, Actor.SetCollision, Blueprint Default Constructor, Character Default Constructor, CharacterSimple Default Constructor, Grenade Default Constructor, Melee Default Constructor, Prop Default Constructor, StaticMesh Default Constructor, VehicleWheeled Default Constructor, VehicleWater Default Constructor, Weapon Default Constructor.

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

Used by Input.SetMouseCursor, Viewport.SetHardwareCursor.

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

Used by Cable.SetAngularLimits, Cable.SetAngularLimits, Cable.SetAngularLimits, Cable.SetLinearLimits, Cable.SetLinearLimits, Cable.SetLinearLimits.

LabelValueDescription
ConstraintMotion.Free0
ConstraintMotion.Limited1
ConstraintMotion.Locked2

DamageType

Used by Damageable.ApplyDamage, Damageable Death Event, Damageable TakeDamage Event, Vehicle TakeDamage Event, Prop TakeDamage Event.

LabelValueDescription
DamageType.Shot0
DamageType.Explosion1
DamageType.Punch2
DamageType.Fall3
DamageType.RunOverProp4
DamageType.RunOverVehicle5
DamageType.Melee6
DamageType.Unknown7

DatabaseEngine

Used by Database Default Constructor.

LabelValueDescription
DatabaseEngine.SQLite0
DatabaseEngine.MySQL1
DatabaseEngine.PostgreSQL2

FallingMode

Used by Character.GetFallingMode, Character FallingModeChange Event, Character FallingModeChange Event.

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

FontType

Used by Canvas.DrawText, TextRender.SetFont, TextRender Default Constructor.

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

GaitMode

Used by Character.GetGaitMode, Character.SetGaitMode, Character GaitModeChange Event, Character GaitModeChange Event.

LabelValueDescription
GaitMode.None0
GaitMode.Walking1
GaitMode.Sprinting2

GizmoTransformMode

Used by Gizmo.SetTransformMode.

LabelValueDescription
GizmoTransformMode.Translation0
GizmoTransformMode.Rotation1
GizmoTransformMode.Scale2

GizmoAlignSpace

Used by Gizmo.SetAlignSpace.

LabelValueDescription
GizmoAlignSpace.Local0
GizmoAlignSpace.World1

GrabMode

Used by Prop.GetGrabMode, Prop.SetGrabMode, Prop Default Constructor.

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

HandlingMode

Used by Pickable.GetHandlingMode, Melee Default Constructor, Weapon.GetHandlingMode, Weapon.SetHandlingMode.

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

HighlightMode

Used by Client.SetHighlightColor.

LabelValueDescription
HighlightMode.Always0
HighlightMode.OnlyHidden1
HighlightMode.OnlyVisible2

HTTPMethod

HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. Read more here.

Used by HTTP.Request, HTTP.RequestAsync.

LabelValueDescription
HTTPMethod.GET0The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
HTTPMethod.POST1The POST method submits an entity to the specified resource, often causing a change in state or side effects on the server.
HTTPMethod.PUT2The PUT method replaces all current representations of the target resource with the request payload.
HTTPMethod.HEAD3The HEAD method asks for a response identical to a GET request, but without the response body.
HTTPMethod.DELETE4The DELETE method deletes the specified resource.
HTTPMethod.PATCH5The PATCH method applies partial modifications to a resource.
HTTPMethod.OPTIONS6The OPTIONS method describes the communication options for the target resource.

ImageFormat

Used by SceneCapture.EncodeToBase64, SceneCapture.EncodeToBase64Async.

LabelValueDescription
ImageFormat.JPEG0
ImageFormat.PNG1
ImageFormat.BMP2

InputEvent

Used by Input.Bind, Input.InputKey, Input.Unbind.

LabelValueDescription
InputEvent.Pressed0
InputEvent.Released1

KeyModifier

💡TIP
This Enum supports Bitwise Operations!

Used by Input.GetModifierKeys.

LabelValueDescription
KeyModifier.None0
KeyModifier.LeftShiftDown1 << 0
KeyModifier.RightShiftDown1 << 1
KeyModifier.LeftControlDown1 << 2
KeyModifier.RightControlDown1 << 3
KeyModifier.LeftAltDown1 << 4
KeyModifier.RightAltDown1 << 5
KeyModifier.LeftCommandDown1 << 6
KeyModifier.RightCommandDown1 << 7
KeyModifier.CapsLocked1 << 8

LightProfile

Used by Light.SetTextureLightProfile.

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

Used by Console LogEntry Event.

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

Used by Light Default Constructor.

LabelValueDescription
LightType.Point0
LightType.Spot1
LightType.React2

NativeWidget

Used by Widget Native Widget Constructor.

LabelValueDescription
NativeWidget.Border0
NativeWidget.Button1
NativeWidget.CheckBox2
NativeWidget.Image3
NativeWidget.ProgressBar4
NativeWidget.RichTextBlock5
NativeWidget.Slider6
NativeWidget.Text7
NativeWidget.ComboBox8
NativeWidget.EditableText9
NativeWidget.EditableTextMultiLine10
NativeWidget.SpinBox11
NativeWidget.TextBox12
NativeWidget.TextBoxMultiLine13
NativeWidget.CanvasPanel14
NativeWidget.GridPanel15
NativeWidget.HorizontalBox16
NativeWidget.Overlay17
NativeWidget.ScaleBox18
NativeWidget.ScrollBox19
NativeWidget.SizeBox20
NativeWidget.UniformGridPanel21
NativeWidget.VerticalBox22
NativeWidget.WrapBox23
NativeWidget.BackgroundBlur24

PackageType

Used by Client.GetPackages, Server.GetPackages.

LabelValueDescription
PackageType.Script0
PackageType.GameMode1
PackageType.LoadingScreen2
PackageType.Map4

SkyMode

Used by Sky.SetSkyMode.

LabelValueDescription
SkyMode.VolumetricClouds0Uses a 3D Volumetric Cloud layer
SkyMode.StaticClouds1Designed to mimic the look of the volumetric clouds but as a static cloud texture. Much lower performance cost than volumetric clouds.
SkyMode.DynamicClouds2D2Uses simple 2D dynamic clouds
SkyMode.NoClouds3Disables all forms of dynamic clouds
SkyMode.VolumetricAurora4Trades clouds for a full 3D volumetric aurora, much more convincing than the 2D effect.
SkyMode.Space5Turns 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

Used by Sound Normal.

LabelValueDescription
SoundType.SFX0
SoundType.Music1
SoundType.UI2

SoundLoopMode

Used by Sound Normal.

LabelValueDescription
SoundLoopMode.Default0Default value defined in the asset
SoundLoopMode.Forever1Overrides it to make it loop forever
SoundLoopMode.Never2Overrides it to make it play once

StanceMode

Used by Character.GetStanceMode, Character.SetStanceMode, Character StanceModeChange Event, Character StanceModeChange Event.

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

SteeringType

Used by VehicleWheeled.SetSteeringSetup.

LabelValueDescription
SteeringType.SingleAngle0Both wheels steer by the same amount
SteeringType.AngleRatio1Outer wheels on corner steer less than the inner ones by set ratio
SteeringType.Ackermann2Ackermann steering principle is applied

SurfaceType

Used by Melee.SetImpactSound.

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

Used by Character.GetSwimmingMode, Character SwimmingModeChange Event, Character SwimmingModeChange Event.

LabelValueDescription
SwimmingMode.None0
SwimmingMode.Surface1
SwimmingMode.Underwater2

TextRenderAlignCamera

Used by TextRender Default Constructor.

LabelValueDescription
TextRenderAlignCamera.Unaligned0
TextRenderAlignCamera.AlignCameraRotation1
TextRenderAlignCamera.FaceCamera2

TextRenderBevelType

Used by TextRender.SetGlyphSettings.

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

TextRenderHorizontalAlignment

Used by TextRender.SetTextSettings.

LabelValueDescription
TextRenderHorizontalAlignment.Left0
TextRenderHorizontalAlignment.Center1
TextRenderHorizontalAlignment.Right2

TextRenderVerticalAlignment

Used by TextRender.SetTextSettings.

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

TriggerType

Used by Trigger Default Constructor.

LabelValueDescription
TriggerType.Sphere0
TriggerType.Box1

TraceMode

💡TIP
This Enum supports Bitwise Operations!

Used by Trace.BoxMulti, Trace.BoxSingle, Trace.CapsuleMulti, Trace.CapsuleSingle, Trace.LineMulti, Trace.LineSingle, Trace.SphereMulti, Trace.SphereSingle.

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

Used by Character.GetViewMode, Character.SetViewMode, Character ViewModeChange Event, Character ViewModeChange Event.

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

VOIPSetting

Used by Player.GetVOIPSetting, Player.SetVOIPSetting.

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

WeatherType

Used by Sky.ChangeWeather, Sky.GetWeather.

LabelValueDescription
WeatherType.ClearSkies1
WeatherType.Cloudy2
WeatherType.Foggy3
WeatherType.Overcast4
WeatherType.PartlyCloudy5
WeatherType.Rain6
WeatherType.RainLight7
WeatherType.RainThunderstorm8
WeatherType.SandDustCalm9
WeatherType.SandDustStorm10
WeatherType.Snow11
WeatherType.SnowBlizzard12
WeatherType.SnowLight13

WebUIModifier

💡TIP
This Enum supports Bitwise Operations!

Used by WebUI.SendKeyEvent, WebUI.SendMouseClickEvent, WebUI.SendMouseMoveEvent.

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

Used by WebUI.SendKeyEvent.

LabelValueDescription
WebUIKeyType.Down0
WebUIKeyType.Up1
WebUIKeyType.Char2

WebUIMouseType

Used by WebUI.SendMouseClickEvent.

LabelValueDescription
WebUIMouseType.Left0
WebUIMouseType.Right1
WebUIMouseType.Middle2

WidgetVisibility

Used by WebUI.GetVisibility, WebUI.SetVisibility, WebUI Default Constructor, Widget.GetVisibility, Widget.SetVisibility.

LabelValueDescription
WidgetVisibility.Hidden0
WidgetVisibility.Visible1
WidgetVisibility.VisibleNotHitTestable2

WidgetSpace

Used by Widget.SpawnWidget3D.

LabelValueDescription
WidgetSpace.World0The widget is rendered in the world as mesh, it can be occluded like any other mesh in the world
WidgetSpace.Screen1The widget is rendered in the screen, completely outside of the world, never occluded