The (presence of )new entity will be at the position specified by pos and with other default location properties. Entity creation is an asynchronous operation and will not block the running script. The script for the new entity is initialized only after the new entity is connected to space.
There are few things that need to be solved as followup of this feature:
- create_entity can take more arguments.
- Reference to existing entity
- may beLocation features like orientation, velocity
- A script to attach to the script
- The addressable array for all the neighboring entities and the new entity should be updated to reflect the new entity. This can be done by adding a callback in ObjectScript and calling it when the space confirms the new entity is connected.
Screen Shots of new entities. The small cubes were created while running the "create.js" script.