Tag Archives: player

Player Control (Touch Device)

I have an arrow sprite and fire button as user control. I would like to make my aircraft can move in 8 direction and fire a missile. Make sure you have given each sprite proper behavior, such “8 Direction” for plane, “Bullet” for missile, and of course “Touch” object type.
SS028

1. Movement Arrow
Event : Touch > Is touching Object > (choose arrow object) > Done
Action : (choose plane as controlled object) > Stimulate Control > (choose the direction) > Done

2. Fire Button
Event : Touch > Is touching object > (choose fire button object) > Done. Add another condition with right clicking on current event > “Add another condition”. System > Every x seconds > (enter rate of fire value of your plane) > Done.
Action : System > Create object > (choose your bullet object) > (put spawn point of your bullet on your plane) > Done.
SS029
Make the game more interesting by added a sound effect. Audio > Play (by name) > (setup your audio) > Done.
SS030