MapEditor.CreateInteractiveObject: Difference between revisions
Document planned 0.1.9 item stats, armor, runes and experimental map-editor seats/lights; not a release |
Release 0.1.9 / BUILD264 / Protocol42: availability and download setup; preserve experimental limits |
||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
<div style="background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;"> | <div style="background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;"> | ||
<div style="color:#111111; font-weight:bold; letter-spacing:0.04em;">AVAILABLE FROM UPDATE 0.1.9</div> | <div style="color:#111111; font-weight:bold; letter-spacing:0.04em;">AVAILABLE FROM UPDATE 0.1.9</div> | ||
<div style="color:#111111; margin-top:0.25rem;"> | <div style="color:#111111; margin-top:0.25rem;">Available from 0.1.9. See the scope and validation notes below.</div> | ||
</div> | </div> | ||
| Line 36: | Line 36: | ||
== Notes == | == Notes == | ||
* | * Available from 0.1.9. 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. | * 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. | * 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. | * 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. 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 --> | |||
Latest revision as of 13:28, 20 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
- Available from 0.1.9. 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. 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.