Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Spike trap trouble: Testing a players X and Y coordinates

MrMonkey7th

Villager
Xy$
0.00
Hello, and thanks for taking the time to take a look at my problem.

I am working on creating a challenge in RPG Maker where the player has to cross some spike traps to reach a pile of treasure. I have got most of it figured out, I used THIS tutorial. Everything works fine, except for the part where rm2kdev scripts the testing of where the players X and Y are, using this code:

$game_player.x == $game_map.events[@event_id].x && $game_player.y == $game_map.events[@event_id].y

The problem is, rm2kdev is using an older version of RPG Maker, VX Ace to be precise, which ran Ruby, not Javascript, code. I am wondering if anyone knows how to create that same code in RPG Maker MV, using Javascript.

Thanks again for your time!
 
Top