Scene barrier when using Grid Based Movement tip

niccosw

  • Posts: 91
Here is a tip to prevent the actor from leaving the scene when using Grid Based Movement.

In the listening blocks for movement, add IF blocks using the following formulas:
moveup: if y of self > 0
moveleft: if x of self > 0
movedown: if y of self < scene height - height of self
moveright: if x of self < scene height - width of self

Here is an example:

Ceric

  • *
  • Posts: 610
Nice, simple fix. Thanks for posting this. It's worth uploading that version to Forge, IMO.