Previously, developers could put three categories of items in the game scene: cubes, props, and creatures. This update adds a fourth major category: entities. Entities have more accurate collision detection and can be rotated and scaled at will. This greatly improves the experience of the game scene.
The next section of the article will demonstrate the properties and functions of the Entity System.
Entities have the ability to add components, which are primarily used to define the attributes and behavior of the entity.
For example, by adding a life attribute component to an entity object, the entity object can be attacked, or by adding a motion behavior component to an entity object, the entity object can move around the scene in a predetermined way.With the expansion of components in subsequent releases, creators can create various types of derivative gameplay with an increasingly low threshold.
1. Basic operation of the entity system
Entry: Advanced Create Mode>Select Mode>Add>Library>Entity Classification (Note: New Entity Objects are not available for old maps created before version 1.6)
Entity object editing: move, rotate, scale
Entity object operations: copy, delete, combine, ungroup, bind, multi-select
2. Component System
1)Appearance components:
The model, color, and material of the entity can be changed
2)Physics components:
The entity's physics type can be set to a static object, movable object, or area, and the collision box, collision event, and collision message can be edited;
Entities have a total of three physics types: area, static object, and movable object, or can be set to none;
By editing the collision box, we can change the size of the entity's collision body to achieve different effects;
3)Motion device components: linear motion, circular motion, oscillation
How to set the motion trajectory:
• We first create a new entity -> create a new mover -> set the type of motion (linear/circular/oscillating), and then we can choose the speed and direction of the object motion;
• The direction of the object's motion is X-axis, Y-axis, and Z-axis, as well as the motion time, the distance of the motion, the time to start the motion (i.e., the initial wait), whether the motion is cyclic, etc. You can also design the motion condition: (start condition after receiving the broadcast);
• We can also observe the movement trajectory of the object in advance, and the movement trajectory will be updated on the map in real-time while setting;
How to set the object's linear motion: create a new entity -> create a new mover -> set the motion type to linear -> set the motion direction and angle
How to set up an object for circular motion: create a new entity -> create a new mover -> set the motion type circular -> set the rotation direction and angle
How to set an object to oscillate: create a new entity -> create a new mover -> set the type of motion to oscillate -> set the direction and angle of oscillation
4)How to use the broadcast system in conjunction with the entity system:
We can use the function of sending broadcasts within the entity function to make an entity that moves when a player enters, as shown below:
The realization is shown below:
We can also use the broadcast system to make an entity that moves when it receives a broadcast:
First, we need to create a trigger to send the broadcast:
Then create an entity to receive this broadcast message after the movement, as shown below:
The final realization is shown below:
5)How to set up a bounce component:
Create a new entity -> create a new bounce -> set the bounce size
3. Node tree mode
Ordinary developers only need to combine, bind, add components and other basic operations on the entity objects in the scene, the threshold is low;
Advanced developers can use the node tree mode to edit the sub-objects on the node tree, and can add components to the sub-objects to compose complex entity objects, which greatly enhances the creation ceiling;
4. Entity templates
Entity objects made by the developer can be saved as entity templates, which can be reused on additional maps by the developer and circulated in the Resource Store in subsequent releases;
5. New entity categorization for Resource Backpack
Developers can save completed entity objects as entity templates, which can be reused on additional maps by the developer and can be uploaded to the resource store;
6. Recommended maps with the entitys
Map id: 16987597858688
Map id:16991901447177
Map id:16983465506226