You can use your chain object as a building block to make a rope bridge your character can run across.
- Now that we've got our chain set up…let's use it to create an obstacle.…I'll open up the obstacles folder.…Right click and say create group,…and I'll call it Spike Ball.…Click OK.…And let's go to our chain controller,…select duplicate and we'll call this…o_spike_ball_controller…and OK.…I'm gonna drag this into our Spike Ball folder.…
So what we'll do to create our obstacle is…instead of anchoring the end of our chain…to a location in the room,…we'll connect it up to our Spike Ball object here.…Let's open up our controller…and in the create event,…we'll first want to change the sprite_width…to sprite_height.…This way we can drag our sprite controller…down in the wide direction,…and that will set how long our chain is.…This will require us to always drag the sprite down, though.…The rest of our code can remain the same.…
We just need to change our last anchor point here…from being a chain_pin…to being an o_spike_ball.…And since we're not changing the location…of the spike ball in the room,…we can just remove this code…
- 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.