Logic Gadgets: Emitter

Icon
Name of gadget Emitter
Section Movers & Outputs
Number of Tweak pages 2
Author LadylexUK, QuietlyWrong
Last updated 19 Mar 2019 [Beta]

Description

This gadget will cause clones of a chosen template object to be emitted from a chosen position using a gizmo. It can be projected away or created on the spot, and can be done once or numerous times. You can choose how many copies are emitted at any one time. It is used for all sorts, such as guns, spawning points, effects and collectables.

Example Tutorial (adapted from Media Molecule)

  1. Stamp a cube
  2. Stamp an emitter
  3. Stamp a controller sensor
  4. Set the controller sensor to remote controllable
  5. Connect the R2 output to the power port on the emitter
  6. Tweak the emitter and set emit mode to once
  7. Choose the cube as the object to emit.
  8. Use start time and press R2 to emit a cube.

Tweak Menus

Click on arrows to reveal

Tweak Menu 1: Properties
  1. Tweak Menu page 1:Properties
  2. Object to Emit
  3. Emit Speed
    3a. Input
    3b. Output
  4. Rotation Speed
    4a. Input
    4b. Output
  5. Ignore Parent Speed
    5a. Input
    5b. Output
  6. Time Between Emits
  7. Emit Mode
  8. Local Space
    8a. Input
    8b. Output
  9. Emitted Object Lifetime
    9a. Input
    9b. Output
  10. Max Emitted At Once
    10a. Input
    10b. Output
  11. Max Emitted
    11a. Input
    11b. Output
  12. Recycle Emitted Objects
    12a. Input
    12b. Output
  13. Power
  1. Menu page indicator
  2. Object to Emit
    Click on this and then attach the dashed line to any element in your scene to select it as the template object for the gadget to emit. Note that when you select your template, it remains in the scene, associated with the emitter, but will now be invisible (when not selected) and will not appear separately in play mode.
    You can still drill down into the template to make changes – you may need to turn off the ‘Preview Invisibility’ option (Show/Hide tools) to see the original object. You can even move the template around once selected; it will still emit from the same place – the relative position of emitter and emitted object remains as it was initially set (you can change it by dragging its gizmo handle).
  3. Emit Speed 
    Use this to set the emission speed for your object in metres per second. A gizmo handle on the template allows you to specify the direction.
  4. Rotation Speed
    Use this to set the rotational speed of your emitted object in degrees per second. Again there is a gizmo handle so you can choose which way your object is going to spin when it is emitted.
  5. Ignore Parent Speed
    This setting allows you to choose whether or not the speed of the emitter itself affects the speed of the objects it emits. For example if you were using an emitter moving along an erratic path to drop snowflakes in “random” places, use this option to stop each snowflake being thrown along the emitter’s current direction.
  6. Time Between Emits
    Use this to specify how often the emitter can emit an object. Remember that an emitter emits first as soon as it is activated, so if the Time Between Emits is 1.0s (and you are emitting continuously), you’ll get one object immediately, the second at 1.0s, the third at 2.0s and so on.
  7. Emit Mode
    • Once
      Select this option if you want the emitter to emit a single object when powered on. To emit another object from this emitter it will be necessary to send an off signal to the Power input first. This is useful for things like emitting an object whenever the player presses a button.
    • Continuous
      Select this option if you want the emitter to emit objects repeatedly, at regular intervals, for as long as it is powered on (and the maximum number of objects has not been reached).
  8. Local Space
    By default, directions are calculated within the global scene space that is shared throughout the scene. Activated this instead if you prefer the emitter to work in its own “Local Space”, i.e. to have the direction of emission dependent on the emitter’s orientation.
  9. Emitted Object Lifetime
    Select a lifetime for your emitted objects: this can be set to infinite (∞), then anywhere from 0.1s upwards. Once the objects have existed for this length of time, they will automatically be deleted from your scene. If you’re emitting a lot of objects which don’t remain in view (spaceship weapons for example), it’s a useful way to keep their numbers down at any given point, which improves the performance of your scene.
  10. Max Emitted at Once
    Use this to specify the maximum number of objects that the emitter can have emitted into the scene at any one time. Set this to infinity (∞), or any number from 1 upwards. Once the number of emitted clones in your level reaches this number, the emitter will stop emitting until the number is reduced in some way. Consider limiting the number of things that can be emitted to improve the performance of your scene.
  11. Max Emitted
    Use this to specify the maximum number of objects that your emitter can emit in total, regardless of how many there are currently in your scene. Once this is reached, the emitter will no longer emit objects. You might use this to stop players from “farming” an area of your game for resources – have one emitter give up its goodies a maximum number of times and then stop. Again, this can be set to infinity (∞), or any number from 1 upwards.
  12. Recycle Emitted Objects
    When this is activated in combination with “Max Emitted At Once”, when the maximum output number is reached, your emitter will be able to continue emitting objects but only by destroying the oldest copies, one at a time. Each newly emitted object replaces the oldest copy left in the scene.
  13. Power
    This is where you turn the gadget on/off
Tweak Menu 2: Inputs & Outputs
  1. Tweak Menu Page 2 : Inputs & Outputs
  2. Object Just Emitted
    2b. Output
  3. Scene Space Direction
    3a. Input
  4. Scene Space Translation
    4a. Input
  5. Destroy Emitted Objects
    5a. Input
  6. Emit With Wires
    6a. Input
    6b. Output
  7. Power
  1. Menu page indicator
  2. Object Just Emitted
    This output sends a pulse signal every time an object is emitted. You’d use this for example if you want the emitter to make a sound effect with every emission. This is better than triggering the sound effect alongside the emitter because this output will take into account whether the emitter cannot emit an object due to maximums being reached.
  3. Scene Space Direction
    Use this input to specify a direction for the object to be emitted in. [Some experimentation required to determine the input signal type! TBA – QW]
  4. Scene Space Translation
    Use this input to specify a relative location for the object to be emitted at. [Presumably a “Transform” fat wire.]
  5. Destroy Emitted Objects
    Input a signal here to destroy all objects that have been created by this emitter in the current scene.
  6. Emit With Wires
    Toggle this to specify whether the objects that you emit will include wire connections – this is only relevant if your template object has wired connections to other objects in your scene.
  7. Power
    This is where you turn the gadget on/off

 

Lex Tips

Useful Tutorials

See How to make an exploding rock for an example using an emitter to emit rock fragments in a specific location (among other things).

Beginners Guide to the Emitter Gadget

Comments and Feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: