useBarrier()

This method is used to make a type of object unable to pass through another type of object.

Parameters

type: string - The type of object which should not pass through barriers.

barrierType: string - The type of object which should become a barrier.

Returns

Nothing

Usage

You should use this method when you want to create barriers in your game.

Examples

Example 1

//File code/server/rooms/room.js
onInit() {
	...
	g.userBarrier('players', 'walls');
}

unlockStore()
checkBarriers()

Need Help?

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

Click Here for Help