Mini-games

Let’s play a game of dice with Arnolt.

1. In dialogue add choice to play dice game. Do you want to play dice? Section is given an output.
2. In scene graph (where we have dialogue blocks) RMB and add Scripting Block.
3. In properties, in functions tab choose StartMiniGameInSceneEx.
4. New tab with properties will appear.
5. In minigame’s template link entity of the level with dice game (e.g. game/minigames/dices_inside.w2ent)
6. Name SpawnPointTag, e.g. dicegame
7. Our opponent wil be Arnolt.
8. On the level place a waypoint, tag it with the same name as in 6. Remember that there a to tag-fields. You have to write "dicegame" in both!
9. From the dialogue script block there should be two options - false (game is lost) and true (game is won). Those can lead to various dialogue sections, adequate to the game’s outcome.

Ps: It is always a good idea to look at your "minigame template" and try to rebuild it in your level where the minigame starts. It adds a lot to the immersion, because otherwise the player might wonder where this minigame actually takes place in your world.