GameMaker objects can set and trigger alarms to run a particular script. In this video we launch the ball using an alarm.
- Now let's write the code to launch our ball.…Go ahead and open up the ball object.…And since we don't want our ball…to be visible at the start,…let's uncheck visible.…In our game, there are two places…that the ball would need to be launched.…One, at the start of the game,…and two, after losing a ball and starting again.…Instead of duplicating the code,…we're going to use what GameMaker calls an alarm.…We'll put our code to launch the ball in an alarm,…and trigger it for both of these cases.…Click add event, alarm.…You can have up to 12 alarms in an object.…
Alarm zero through alarm 11.…We'll use alarm zero.…On the control tab,…choose the execute code action,…and drag it to your actions list,…and let's maximize the window.…Give it a three slash comment saying Launch ball,…and then let's try a simple If-check,…to see if our ball's been launched.…If ballLaunched equals false,…then we know our ball hasn't been launched yet.…Within this code,…let's mark ballLaunched true,…so we don't launch our ball again.…Next, we are going to set the exposition of our ball.…
- Creating a new GameMaker project
- Creating sprites
- Importing existing images
- Adding collisions
- Playing sounds
- Designing game levels
- Creating start and game over screens
- Exporting the game
Skill Level Beginner
iOS Game Development with Swift 3 and SpriteKitwith Todd Perkins2h 52m Intermediate
1. Getting Started
2. The Game Pieces
3. The Gameplay
4. The Game Cycle
5. Finishing a Project
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.