Time for action – creating a behavior to drop the statues
The game file that needs to be imported and loaded for this session is 5961_04_05.stencyl
.
We're going to start by creating a behavior to drop the statues into a single location in the scene, and then we'll refine the behavior as we progress. Execute the following steps in order to create a behavior to drop the statue:
On the Dashboard, under the LOGIC heading, click on Scene Behaviors.
Click on the message This game contains no Logic. Click here to create one. in the main panel.
In the Name textbox, type
Drop Actors Randomly
and click on the Create button to display the behavior editor.At the top of the left-hand panel, click on + Add Event.
In the pop-up menu, move the mouse over Time, then click Every N seconds (not After N seconds).
Double-click on the Every N secs item in the left-hand panel, and change the name of the event to
Drop statues
.In the orange do every … seconds block, enter the digit
3
into the white textbox.Click on the...