Skip to content

Commit 4195a27

Browse files
committed
Add modular features docs
1 parent 90107a8 commit 4195a27

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,8 @@ Tips and considerations for the integration into a custom respawn system.
3737
### 12. [Query builder](query-builder.md)
3838
Persistence specific db query builder utlity.
3939

40-
### 12. [Debugging and metrics](debugging.md)
40+
### 13. [Optional features](optional-features.md)
41+
Modular persistence extensions such as door or destruction management.
42+
43+
### 14. [Debugging and metrics](debugging.md)
4144
Optional debug steps and peformance metrics.

docs/optional-features.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Optional features
2+
Optional persistence features can be added as child components of type [`EPF_PersistenceManagerExtensionBaseComponent`](https://enfusionengine.com/api/redirect?to=enfusion://ScriptEditor/Scripts/Game/EPF_PersistenceManagerExtensionBaseComponent.c;6) to the [`EPF_PersistenceManagerComponent`](https://enfusionengine.com/api/redirect?to=enfusion://ScriptEditor/Scripts/Game/EPF_PersistenceManagerComponent.c;28). They provide an easy way to hook into the persistence world setup process to prepare/restore additional features that might not be needed for all game modes.
3+
4+
## [`EPF_PersistentDoorStateManagerComponent`](https://enfusionengine.com/api/redirect?to=enfusion://ScriptEditor/Scripts/Game/DoorManager/EPF_PersistentDoorStateManagerComponent.c;8)
5+
The persistent door state manager allows to persist the open/close state of doors on the map. By default all doors from all buildings are saved if they are not in default position (closed). Optionally a [`EPF_PersistentDoorStateFilter`](https://enfusionengine.com/api/redirect?to=enfusion://ScriptEditor/Scripts/Game/DoorManager/EPF_PersistentDoorStateFilter.c;2) can be configured in the attributes to e.g. only track doors that are near a base building territory or certain villages on the map.
6+
The door states are tracked through the [`SCR_DoorUserAction`](https://enfusionengine.com/api/redirect?to=enfusion://ScriptEditor/Scripts/Game/DoorManager/SCR_DoorUserAction.c;7). If you have custom scripted mechanisms to open and close doors, consider adding a call to `EPF_PersistentDoorStateManager.UpdateDoorState` as demonstrated in the modded action.

0 commit comments

Comments
 (0)