Last active
February 21, 2018 00:36
-
-
Save Shilo/c723d452aa803b8d2829f0c78f7f9e18 to your computer and use it in GitHub Desktop.
VyScript to detect what side of map void the player bumps into. (Vylocity engine: http://vylocity.com/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mob/Player | |
onBump(pB) | |
if (pB == Map.void) | |
if (this.xPos == -this.xOrigin) | |
World.log("bumped against left void") | |
else if (this.yPos == -this.yOrigin) | |
World.log("bumped against top void") | |
else if (this.xPos == Map.getMapSize(this.mapName).xPos-this.xOrigin-this.width) | |
World.log("bumped against right void") | |
else | |
World.log("bumped against bottom void") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment