Little Big Planet style emitters

By LadylexUK

Little Big Planet is a 2d platformer creator (essentially). In it you can place objects called emitters which can create objects which you can use as hazards or helps in your platforming game. In this tutorial we will make an emitter that will create a block in front of it that you can use to get across a hazard such as a fall, or water. As we are recreating little big planet I have used the sound gizmo as the emitter, it can be visible or invisible as you require.

If you are using the 2d platforming character brain. Make sure you add that to your character first, so that you build all your props in the correct orientation.

Make a block, platform, or whatever you want your emitter to make.
In its brain add this kode (you will delete this later)

  1. WHEN DO [display][position][above]

Place a sound gizmo in the world. Paint it black and make it visible. Add this kode (you will delete this later)

  1. WHEN DO [display][position][screen bottom center]

Our first kode will create a platform when the player is in the trigger zone of the emitter, and will disappear when the player is out of the trigger zone. Place various emitters in a line and this will create an appearing, disappearing bridge under his feet.

Turn the trigger zone sensor on in the sound gizmo. Make it the same width as your block and place it in front of and central to the sound gizmo. Place your block underneath the trigger zone.

Test. Note down the coordinates of the gizmo and the block. There will be 3 for each.
See the difference between the gizmo and the block x,y, and z coordinate, either plus or minus or the same. Keep this information.

In my example the coordinates were

x in the gizmo 18.500,  x in the block 17.825 difference of minus 0.675
y in the gizmo 14.175 y in the block 13.675 difference of minus 0.5
z in the gizmo 18.000 z in the block 18.000 same
Put the block to the side and make it a template. You can remove the display coordinates from both brains now.

In the gizmo brain

  1. WHEN DO [numvar:x][equals][position][x][ minus][0.675]
  2. WHEN DO [numvar:y][equals][position][y][ minus][0.5]
  3. WHEN DO [numvar:x][equals][position][z]
  4. WHEN DO [vectorvar][equals][east][multiplied by][numvar:x][plus][world up][multiplied by][numvar:y][plus][north][multiplied by][numvar:z] // this is the position of the block in relation to the gizmo.
  5. WHEN [started to][in trigger zone][player] DO [objvar:box][equals][create][IWP:block][at position][vectorvar:block]
  6. WHEN [no longer][in trigger zone][player] DO [destroy][objvar:box]

This slight variation will make a block appear for a timed period.

  1. WHEN [started to][in trigger zone][player][and][not][objvar:box] DO [objvar:box][equals][create][IWP:block][at position][vectorvar:box]
  2. WHEN [objvar:box]
  3. …WHEN [countdown timer] DO [destroy box] // change this number for length of time box exists

This variation will place a block in a timed loop, with chained gizmos firing up to create a bridge hazard.

  1. WHEN [countdown] // Add this to the second gizmo in your chain, Add an extra second for each platform in your chain.
  2. …WHEN [countdown timer][loop] DO [numvar:timer][increment by][1]
  3. …WHEN [numvar:timer][equal to][4] DO [objvar:box][equals][create][IWP:block][at position][vectorvar:box] // this number was good for my 3 gizmo chain. Change this to suit.
  4. …/…WHEN DO [numvar:timer][equals][0]
  5. WHEN [objvar:box]
  6. …WHEN [countdown timer] DO [destroy box] // change this number for length of time box exists

Comments are closed.

Website Powered by

Up ↑

%d bloggers like this: