Skip to main content
  1. Projects/
  2. Tiled Level/
  3. Tutorial/

Controller

Tutorial
Table of Contents

About
#

Tiled level controller is a new feature in V4.0 which grants you the ability to fully controler each placement in a tiled level. It’s where you can add your blueprint code and. You can assign a controller class for each level, and then just run the logic you desire. Here is a simple tutorial to create some interesting effects.

General Idea
#

The controller provides these types of functions:

  1. get, find, and filter placements in guid
  2. get placement info from guid
  3. get level info
  4. hide / unhide placement
  5. Transform placement
  6. Lerp transform of placement through time

Check out controller_api for all the functions.

You can wisely use them to create any stunning visual presentation for you level.

Setup
#

  1. Create an actor inherit from tiled level controller
  1. Set the controller class in either way
    • on level asset
  • on the level on map

Example effects
#

Prepare float curves
#

Lerp transform through time would require some curve assets.

You can create them this way:

Add key and edit. The length should be the duration of your animation.

Assemble effect
#

Open the controller actor and add these logic

  1. set the transform of each placement to a random position
  • Create variable RandomInitTransforms (array of transform)

  • run update transform to let each placement move back to it’s origin transform

  • Create variable Id (integer), to use index way to loop. (in order to add delay)

  • Use the curves you previous created.

  • Trigger it on begin play!

Final assemble me
#

Growth effect
#

  1. Create BatchGrowth event
    • Create variable Defaults and Smalls (array of transform)
    • Use the curves you previous created.
  2. Create RunBatchGrowth event
    • Create variable Central, Rest (array of guid), and N (integer)
    • Use Search Placement by Tile Position to separate placements in batches from center to outer
    • Run BatchGrowth with some delay
  3. Trigger it on begin play!

Final growth effect
#