The periscope and the scrolling
The periscope and the scrolling
We are now going to enter the movement of the periscope. Go back to the frame editor (by clicking on its icon in the toolbar). Click on the periscope object to display its properties in the property explorer. Locate the "Movements" tab in the explorer and click on it. Choose the "Eight directions" movement in the "Type" property.
Click on the "Initial direction" property, and select only directions to the left and right.
Lets make the game scroll. Go back in the event editor, and enter the following events. The first line makes sure the periscope does not get out of the screen. The second actually makes the scrolling, by synchronising the center of the frame with the periscope.
- (periscope) leaves the play area on the left or right
(periscope) : Stop
- Always
: Center display at X=X( " (periscope)" )
Spread the word!
You can share this document using the following buttons.