FANDOM


Creating Actors

Use the create-actor-of-type block (under Scene > Actors).

Image00
  • You can drag an actor-type block into the Choose Actor Type field. This is useful when you want to make this field configurable.
  • Front / Middle / Back will place the actor on those layers, respetively. Middle will choose whatever layer is closest to the middle. If you need a specific layer, change the actor's layer after creation.
  • In terms of execution order, when you create an actor, the new actor's "when created" event is run before the current behavior proceeds further.

Referring to the "Last Created Actor"

Sometimes, you’ll want to refer to the actor that you just created. Use the “last created actor” option under any Actor dropdown to do this.

Image06

Destroying Actors

Destroying actors is similar to creating them. Use the kill-actor block (under Scene > Actors).

Image05

Killing an actor is immediate. Don’t attempt to refer to an actor at any point after you’ve killed it. Especially during timed tasks (do-after, do-every), where it's easy for this to happen by accident.

Events: Knowing when actors get created or die

We provide events that let you control what happens when an actor is created or destroyed. Select one of these events via the “Add Event” button.

Image04
  • When an actor dies, the die event happens before the actor actually dies, so you can still refer to it during the event.
  • When an actor is created, the actor's "when created" event always runs first. Then, the other created events pertaining to the actor are run.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.