Enums
Named constant tables for Motix.
Access enums via Motix.Enums for controller enums and via Motix.MotixNet.Enums for
network enums.
Using named constants instead of raw strings makes mistyped values fail immediately at the point of use (a nil-index) rather than silently at runtime.
-- Good: typos fail immediately
Motix.MotixNet.Enums.NetworkMode.ServerAuthority
-- Risky: typos pass silently
"serverAuthority"
Properties
Action
Enums.Action: ActionEnumAnimation directive action types. Used internally by the state machine entry/exit system. Not typically needed in user code.
Motix.Enums.Action.Play -- "PLAY"
Motix.Enums.Action.Stop -- "STOP"
Motix.Enums.Action.StopGroup -- "STOP_GROUP"
| Key | Value |
|---|---|
Play |
"PLAY" |
Stop |
"STOP" |
StopGroup |
"STOP_GROUP" |
ConflictVerdict
Enums.ConflictVerdict: ConflictVerdictEnumVerdicts produced by layer and group conflict resolution. Used internally by the controller. Not typically needed in user code.
Motix.Enums.ConflictVerdict.Allow -- "ALLOW"
Motix.Enums.ConflictVerdict.Defer -- "DEFER"
Motix.Enums.ConflictVerdict.Reject -- "REJECT"
| Key | Value | Meaning |
|---|---|---|
Allow |
"ALLOW" |
The incoming animation may play. |
Defer |
"DEFER" |
The incoming animation is queued pending the current animation finishing. |
Reject |
"REJECT" |
The incoming animation is discarded. |
NetworkMode
Enums.NetworkMode: NetworkModeEnum
Authority modes for MotixNet. Pass to NetworkConfig.Mode when creating a MotixNet
instance.
local Net = Motix.MotixNet.new(Controller, HashReg, {
Mode = Motix.MotixNet.Enums.NetworkMode.ServerAuthority,
})
| Key | Value | Description |
|---|---|---|
ClientAuthoritative |
"ClientAuthoritative" |
Clients send intents. Server validates and relays. Default. |
ServerAuthority |
"ServerAuthority" |
Only server code may trigger animations. All client intents are dropped. |
SharedAuthority |
"SharedAuthority" |
Both client and server may emit intents. Client intents are validated. Server calls bypass validation. |
ValidationReason
Enums.ValidationReason: ValidationReasonEnumRejection reasons fired on MotixNetServer.OnIntentRejected.
Net.OnIntentRejected:Connect(function(player, reason)
if reason == Motix.MotixNet.Enums.ValidationReason.RateLimited then
-- handle rate limiting
end
end)
| Key | Value | Meaning |
|---|---|---|
Passed |
"Passed" |
Validation succeeded. Not fired on rejection; used internally. |
PlayerNotFound |
"PlayerNotFound" |
Sending player could not be identified. |
SessionInactive |
"SessionInactive" |
Player does not have an active session. |
UnknownAnimHash |
"UnknownAnimHash" |
Hash not found in the server's HashRegistry. |
InvalidAction |
"InvalidAction" |
Action byte is not 0 (PLAY) or 1 (STOP). |
StaleIntent |
"StaleIntent" |
Intent timestamp older than MaxIntentStaleness. |
RateLimited |
"RateLimited" |
Token bucket exhausted. |