Use Barrier

Learn how to create a barrier to block characters.

1. Making a barrier

To create a barrier you have to decided which characters will be affected by the barrier and then you use the useBarrier function in the room.js file inside of the onInit method.

onInit() {
	g.useBarrier('players', 'trees');

This example will make it so that players can’t go through trees because the trees become barriers.

Setup Leaderboard
Use Items

Need Help?

Proofread your code, check with your team and classmates, and if you’re still stuck!

Click Here for Help