MapEditor.CreateInteractiveObject: Difference between revisions
Document planned 0.1.9 item stats, armor, runes and experimental map-editor seats/lights; not a release |
Complete upcoming 0.1.9 documentation: weather, crafting UI, world removal, doors and ladders; preserve release status |
||
| Line 41: | Line 41: | ||
* Finish pending edits and any active local native test before changing the scene. Use Test native for local sit/stand or flame checks. | * Finish pending edits and any active local native test before changing the scene. Use Test native for local sit/stand or flame checks. | ||
* The optional table copies transform fields only, not arbitrary properties or game class paths. Set initial light state through the editor inspector. | * The optional table copies transform fields only, not arbitrary properties or game class paths. Set initial light state through the editor inspector. | ||
* | * This helper does not deploy shared interactions. Approved doors have a separate server-owned path in the updated editor/map_scene; seats, lights and placed ladders remain local tests. | ||
[[Category:Lua Functions]] | [[Category:Lua Functions]] | ||
[[Category:Client Functions]] | [[Category:Client Functions]] | ||
[[Category:Experimental Lua API]] | [[Category:Experimental Lua API]] | ||
<!-- editor019complete:start --> | |||
== Expanded 0.1.9 catalog and deployment == | |||
'''Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8. Use matching updated clients and server.''' | |||
[[Interactive prefab catalog]] now has 94 entries including seven doors and 21 ladder sizes. The helper only queues editor entries/previews. [[Interactive map objects]] explains local testing versus shared door deployment, and [[World model removal]] explains original-world inspection/removal. Do not confuse deleting an editor entry with hiding an original world placement. | |||
<!-- editor019complete:end --> | |||
Revision as of 20:56, 19 October 2026
MapEditor.CreateInteractiveObject
Creates an interactive-prefab entry and static editing preview inside the initialized map_editor client resource. This is an experimental editor helper, NOT a server multiplayer spawn API.
Syntax
id = MapEditor.CreateInteractiveObject(prefab, transform)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
prefab |
string |
yes | Exact ID from the Interactive prefab catalog, for example chair_01. |
transform |
table |
no | Optional x/y/z (metres), yaw/pitch/roll (degrees), sx/sy/sz. Defaults: position/rotation 0, scale 1. Only yaw rotation, unit scale and original collision are supported. |
Returns
An editor ID string when the operation is queued, or false if rejected/busy. Native completion is asynchronous; a returned ID is not proof of a created native actor. Only successful completion updates the editor scene.
Examples
-- Inside the map_editor client resource, after session initialization:
local id = MapEditor.CreateInteractiveObject("chair_01", {
x=12.0, y=24.0, z=2.0, yaw=90.0
})
if not id then
outputDebugString("Placement not queued")
end
Notes
- Planned for 0.1.9, not included in public 0.1.8. See Interactive map objects and Interactive prefab catalog.
- Available only in the map_editor client Lua environment; not an engine-global function or an automatic cross-resource export.
- pitch/roll must be 0 and sx/sy/sz must be 1. Prefab scale/collision restrictions preserve native interaction alignment.
- Finish pending edits and any active local native test before changing the scene. Use Test native for local sit/stand or flame checks.
- The optional table copies transform fields only, not arbitrary properties or game class paths. Set initial light state through the editor inspector.
- This helper does not deploy shared interactions. Approved doors have a separate server-owned path in the updated editor/map_scene; seats, lights and placed ladders remain local tests.
Expanded 0.1.9 catalog and deployment
Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8. Use matching updated clients and server.
Interactive prefab catalog now has 94 entries including seven doors and 21 ladder sizes. The helper only queues editor entries/previews. Interactive map objects explains local testing versus shared door deployment, and World model removal explains original-world inspection/removal. Do not confuse deleting an editor entry with hiding an original world placement.