|
153 | 153 | -- After creation the object is in the disabled state. Use :teleport to place to the world or :moveInto to put it into a container or an inventory. |
154 | 154 | -- Note that dynamically created creatures, NPCs, and container inventories will not respawn. |
155 | 155 | -- @function [parent=#world] createObject |
156 | | --- @param #string recordId Record ID in lowercase |
| 156 | +-- @param #string recordId Record ID. String ids that came from ESM3 content files are lower-cased. If another ID is provided, it must be provided exactly as it is, case sensitive. |
157 | 157 | -- @param #number count (optional, 1 by default) The number of objects in stack |
158 | 158 | -- @return openmw.core#GameObject |
159 | 159 | -- @usage -- put 100 gold on the ground at the position of `actor` |
|
162 | 162 | -- @usage -- put 50 gold into the actor's inventory |
163 | 163 | -- money = world.createObject('gold_001', 50) |
164 | 164 | -- money:moveInto(types.Actor.inventory(actor)) |
| 165 | +-- @usage -- create the an object for the first generated item |
| 166 | +-- potion = world.createObject('Generated:0x0', 1) |
165 | 167 |
|
166 | 168 | --- |
167 | | --- Creates a custom record in the world database. |
| 169 | +-- Creates a custom record in the world database; String ids that came from ESM3 content files are lower-cased. |
168 | 170 | -- Eventually meant to support all records, but the current |
169 | 171 | -- set of supported types is limited to: |
170 | 172 | -- |
|
177 | 179 | -- * @{openmw.types#ActivatorRecord}, |
178 | 180 | -- * @{openmw.types#LightRecord} |
179 | 181 | -- @function [parent=#world] createRecord |
180 | | --- @param #any record A record to be registered in the database. Must be one of the supported types. |
| 182 | +-- @param #any record A record to be registered in the database. Must be one of the supported types. The id field is not used, one will be generated for you. |
181 | 183 | -- @return #any A new record added to the database. The type is the same as the input's. |
182 | 184 |
|
183 | 185 | --- @{#VFX}: Visual effects |
|
0 commit comments