How create game object?

In addition to the properties mentioned in the above answer, each call to factory.create() also returns the game object ID of the object (such as “/instance1”). If you write

local obj = factory.create(...)

you will be able to get and change its position, pass messages to your created object, store it in a list, etc. For a full reference to factories, see the factory reference.

2 Likes