Difference between revisions of "User:Kaeza/Test"

From Minetest Developer Wiki
Jump to navigation Jump to search
m
(Replaced content with "{{delete}}")
Tag: Replaced
 
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<br />
 
local entity = minetest.add_entity(pos, "foo_mod:bar_entity")<br />
 
<br />
 
-- Do something with it.<br />
 
entity:[[setacceleration]]({x=0, y=-1, z=0})<br />
 
</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.