Introduction
Killing actor means removing objects from the game scene. It can be npcs, players, items or butons or even HUDs. Since all game objects are actors.
case: kill self. Please do no relate this page to suicides for this is not a suicide related blog but just how Stencyl write its snippets.
snippet
Codes
Note: actor in code mode is Self in Design mode.
preview code
recycleActor(actor);
code without import com.stencyl.behavior.Script.*
Script.recycleActor(actor);
computational shortcut:
Engine.engine.recycleActor(actor);

No comments:
Post a Comment