Jump to content

Interact with object on keypress


herbo4
 Share

Recommended Posts

Hi all, I've been using Phaser a bit and I'd like to do a lot with it! I currently have my code hosted live in a little nook of a website, not sure if I should share that url here or not, but I have a nice demo of the rough start of an engine like some of the old RPGs like Secret of Mana or Chrono Trigger. I can move with WASD in 8 directions, all the while animating correctly and resetting the animation to an appropriate frame when you stop relative to where you are facing. I also have anchors and z-depth sorting worked out in such a way that I can emulate depth, width, and height in meaningful ways for collision handling. I'm working on interactable events, like opening chests, talking to people, and making checks in the game in general. The way I'd like to do this is a function interact() that I have in all objects that our players can interact with, and a keypress that triggers it. Can anyone point me to a simple example of a dialogue being started or a chest being opened? I couldn't find one on the examples list, sorry if I'm blind.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...