Skip to content

Commit abc625b

Browse files
committed
update future readme
1 parent 6e4c6d0 commit abc625b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

api/custom-entities/README.future.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Custom Entities API provides a flexible framework for managing and creating
66

77
## Implementing a Custom Entity
88

9-
### Registering a New Entity Class
9+
### 📚 Registering a New Entity Class
1010

1111
To implement a custom entity, the first thing you need to do is register a new entity class using the `CE_RegisterClass` native function. This can be done in the `plugin_precache` function, allowing you to place your entities directly on the map using the registered class as the `classname`.
1212

@@ -24,9 +24,9 @@ public plugin_precache() {
2424

2525
In this example, the `CEPreset_Item` preset class is used to implement the item. It inherits logic for items such as pickup methods.
2626

27-
### Setting Entity Properties
27+
### ⚙️ Setting Entity Members
2828

29-
The entity currently lacks a model and size, so let's provide them by implementing the `Allocate` method for the entity to supply all the necessary properties:
29+
The entity currently lacks a model and size, so let's provide them by implementing the `Allocate` method for the entity to supply all the necessary members:
3030

3131
```cpp
3232
public plugin_precache() {
@@ -53,7 +53,7 @@ In the implementation of the `Allocate` method, the `CE_CallBaseMethod()` call a
5353
5454
Natives like `CE_SetMemberString` and `CE_SetMemberVec` are used to set members/properties for the entity instance. Constants such as `CE_MEMBER_*` are used to specify the property names that will set the model each time the entity is spawned or its variables are reset. For example, `CE_MEMBER_MODEL` sets `pev->model` of the entity every respawn. Similarly, `CE_MEMBER_MINS` and `CE_MEMBER_MAXS` specify the entity's bounding box.
5555

56-
### Writing Logic for the Entity
56+
### 💡 Writing Logic for the Entity
5757

5858
Our `item_key` entity is functional, allowing you to place the entity with the classname `item_key` on your map. It will spawn in the game and can be picked up.
5959

@@ -93,7 +93,7 @@ public plugin_precache() {
9393

9494
This simple implementation will display the text `"You have found a key!"` to the player who picks up the key and mark that the player has picked up a key.
9595

96-
### Custom Properties
96+
### 🧩 Custom Members
9797

9898
If you want to implement different key types, you can use custom members. Let's update our logic and improve the code:
9999

@@ -185,7 +185,7 @@ Here, we added `KeyType` constants to represent different key types and implemen
185185

186186
You may have noticed the constant `m_iType`, which is a string constant used for the custom member we work with using `CE_GetMember` and `CE_SetMember` natives. We also use `CE_RegisterClassKeyMemberBinding` to bind this member to the entity key `type`, allowing us to change the key type by setting the `type` key-value on the map.
187187

188-
### Testing and Debugging
188+
### 🕵️‍♂️ Testing and Debugging
189189

190190
> What if we don't have a map yet to test it? Is there another way to spawn our entity?
191191

0 commit comments

Comments
 (0)