|
You can save long-term data to a player's profile through the save action in the effect builder. It is great for creating game modes where the player's progress carries on through multiple matches. Example modes: singleplayer Rogue-like modes, multiplayer arena or battle royale modes.
|
|
You can save long-term data to a player's profile through the save action in the effect builder. It is great for creating game modes where the player's progress carries on through multiple matches. Example modes: singleplayer Rogue-like modes, multiplayer arena or battle royale modes.
|
|
|
|
|
|
Select game properties when saving data to profile. Use the dot syntax to select deep into the game. For this action, the context is automatically the game.
|
|
Select player properties when saving data to profile. Use the dot syntax to select deep into the player. For this action, the context is automatically the player.
|
|
|
|
|
|
```
|
|

|
|
player1.hand
|
|
|
|
player1.maxMana
|
|
|
|
```
|
|
|
|
|
|
|
|
Saving the cards a player owns.
|
|
Here we're saving 2 properties of the player, SPBRDeck (Single Player Battle Royale Deck) and SPBRHealth (Single Player Battle Royale Health). The properties need to be set before hand onto the player. Simply grab the relevant data and set it onto the player. Use the [set data to player](https://dulst.com/animalkingdom/cards/9059501/set-data-to-player) action that comes with most templates, it makes the process trivial.
|
|
|
|
|
|
In some modes, you may want a player to select cards and then carry those cards throughout the game. To save those cards, select their [nid](nid) and save them to an array. Then save that array.
|
|
## Accessing save data
|
|
|
|
|
|
Saving changes to cards can be done as player or game variables.
|
|
The saved data is accessible on every subsequent match by selecting the player through the effect builder. It is in the `data` property of the player. You can access it by using the dot syntax. |
|
|
|
\ No newline at end of file |
|
[[Load]] |
|
|
|
\ No newline at end of file |
|
|