You can see how to create a simple trigger object that can do things like drop objects and fire projectiles.
- [Instructor] One thing that works great…in physics-based games like this…is having our level react to our player.…We can do this by using triggers.…So, let's look at how to create them.…In our objects folder,…I'll open up the Titles folder.…Right click and say Create Object.…Then, we'll call this O underscore trigger.…I'll grab the sprite dropdown, go to Tiles,…and select the trigger sprite.…I'll check the Uses Physics button.…Set our collision shape to Box.…Let's ensure that it matches our sprite.…
There we go.…And we don't want this to move,…so I'm gonna set this density to zero.…And them, I'm also gonna check the Sensor box.…Sensor is the way that we tell the physics engine…that we only want this object…to respond to collision events.…But we don't want it to be affected…by forces in the room or anything else…that's happening in the physics engine.…So, the goal is that when our player touches this object,…we can use it to trigger other events in the room.…Let's click Add Event.…And let's add a create event.…I'll drag in a code block.…
- Setting up basic game components
- Creating the player object
- Using Finite State Machines
- Making the player duck
- Creating physics fixtures in code
- Creating physics obstacles
- Box2D liquid physics
- Creating particles that behave like water
- Creating a floating blocks obstacle
- Creating a swinging chain obstacle and a rope bridge
- Adding the finishing touches
Skill Level Beginner
1. Set Up Basic Game Components
2. The Player Object
3. Create Physics Obstacles
4. Liquid Physics
5. Decorate the Level
6. Finishing Touches
Next steps1m 2s
- 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.