-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Optional features | ||
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. | ||
|
||
## [`EPF_PersistentDoorStateManagerComponent`](https://enfusionengine.com/api/redirect?to=enfusion://ScriptEditor/Scripts/Game/DoorManager/EPF_PersistentDoorStateManagerComponent.c;8) | ||
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. | ||
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. |