Enabled state API
Queue an enabled-state change for the behavior owner.
When to call it
Disable an entity when its behavior should stop after the current callback. Re-enable it from a controlling behavior or editor action. Use a local boolean instead when the entity should remain active.
Calls
rustic.set_enabled(enabled)
Variables
| Variable | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | True to enable; false to disable. |
Return and timing
No value. The change applies after the callback and can trigger enable/disable lifecycle callbacks.
Language examples
Lua 5.4
lua
rustic.set_enabled(false)JavaScript
javascript
rustic.set_enabled(false);Python
python
rustic.set_enabled(False)C++
cpp
rustic.set_enabled(false);C#
csharp
rustic.set_enabled(false);Luau
lua
rustic.set_enabled(false)C
c
rustic.set_enabled(false);Java
java
rustic.set_enabled(false);PHP
php
$rustic->set_enabled(false);HTML / inline JS
javascript
rustic.set_enabled(false);Constraints and behavior
- Every gameplay language calls the engine-owned API. Rustic supplies SDKs and dispatches callbacks; scripts do not parse requests or serialize responses. See the language guide for complete setup and callback registration.