Dream - Alternative Reality Package

Slide 16_9 - 2

Dream is a mystery themed package which allows you to change the whole world state dynamically!
Creare multiple realities, multi-dimensinal universes or detective stories. It’s up to your imagination how the Dream can be used.

Made for Build Jam - Science Fair
Author: Elfwy


Features

  1. UNLIMITED WORLDS - Count of worlds you want to create in your game is unlimited. Each world state is a separate script dragged into the User template.
  2. TRANSITION EFFECT - Meet the first nice transition - spooky bats covering the screen to make world change process seamless.
  3. API - The first version of the package contains everything necessary to communicate with it excluding any problems.

Installation & Easy setup

1. Install 'Dream' package from the community section.

2. Drag 'Dream' from templates tab to the User template.

Crayta 2022.10.17 - 14.09.24.03_2

3. Drag 'DreamTriggerExample' to the layout.

Crayta 2022.10.17 - 14.09.24.03

Your test level is ready!


:scroll: Scripts

  • dreamScriptUser / SCRIPT — This is the core script, contains most logic and API. Use on user only.

  • dreamState / SCRIPT — This is a state declaration. Drag this script to the User template and get it a name. Now you can edit all its properties as you wish, they will automatically apply on update. Each new script is a separate state.

  • dreamEntityFlag / SCRIPT — Drag this script to an entity and it will become a part of the state system. Use one or multiple state names in the stateName property and the whole hierarchy will be appeared when the state(s) are active. Supported: CharacterBase, Effect, Light, Locator, Mesh, Shape, Sound, Trigger, VoxelMesh.

:gear: API

  • Dream_UpdateState — Set current state.
    user.DreamScriptUser:Dream_UpdateState(stateName String)

  • Dream_SwitchState — Switch between two states. If current is not one of those, set to the first.
    user.DreamScriptUser:Dream_SwitchState(firstState String, secondState String)

  • Dream_GetState — Get current state.
    user.DreamScriptUser:Dream_GetState()

  • Dream_GetEntities — Get all active entities for given state.
    user.DreamScriptUser:Dream_GetEntities(stateName String)

:warning: Note

  • The package doesn’t support changing local states for each player separately yet.

preview

9 Likes