Difference between revisions of "User:Kaeza/Test"

From Minetest Developer Wiki
Jump to navigation Jump to search
(Created page with " = add_entity = <code>minetest.add_entity(pos, name)</code> Spawns a Lua-defined entity at the specified position. The <code>name</code> parameter specifies the name of...")
 
(Replaced content with "{{delete}}")
Tag: Replaced
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
+
{{delete}}
= add_entity =
 
 
 
<code>minetest.add_entity(pos, name)</code>
 
 
 
Spawns a Lua-defined entity at the specified [[position]].
 
 
 
The <code>name</code> parameter specifies the name of the entity to add, which
 
must have been previously registered via a call to <code>[[register_entity]]</code>.
 
 
 
Returns the new entity as a [[LuaObjectRef]].
 
 
 
== Example ==
 
 
 
<code>
 
local pos
 
local entity = minetest.add_entity(pos, "foo_mod:bar_entity")
 
 
 
-- Do something with it.
 
entity:[[setacceleration]]({x=0, y=-1, z=0})
 
</code>
 

Latest revision as of 19:44, 25 January 2023

Mbox warning.png This page has been proposed for deletion for the following reason: "{{{1}}}"
If you don't think that this page should be deleted, please explain why on the talk page.