How do I implement a choosing the answer by cursor?

0 favourites
  • 3 posts
From the Asset Store
Cursor Magic
$2 USD
80% off
Mouse cursor is something that the player controls and sees all the time, that's why it is so important to make it cool!
  • Hi everyone,

    I just completed Kyatric rpg-styled dialog system tutorial:

    h*t*t*p*s://www.youtube.com/watch?v=ijBCGkJ4uMA&spfreload=10

    First, thank you Kyatric for this tutorial. It really helped me to improve my portfolio/game. Everything is working fine and I'm happy with the results.

    Now I'm thinking of improving this dialog system. I'm trying to do a cursor -system which is used to choose the right answer. Now picking is made by clicking the right answer with a mouse (I think everybody knows this after watching the tutorial ^^ ). By cursor -system, I mean a system like in every game, where player move the cursor on screen to choose something. For example, in inventory to choose the gear or to choose the answer for the question ;)

    So my question is, how to implement a cursor based system for this rpg-styled dialog system? I have done some experiments but none of them worked. Any help is highly appreciated :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • In the original tutorial, event 25 is the event that expects for the user to click on one of the Answer text.

    You will have to replace that event with some keyboard event that "selects" the answer out of a cursor.

    Also event 22 is about displaying the answers. Modify it, so that we are using "CursorAnswer" as the cursor we will move. Add an "ID" instance variable to the "CursorAnswer" object.

    Then add a couple events to handle the fact of switching between answers, according to a key press (for example left and right key).

    Keep the selected Answer value in a global variable.

    Event 25 processes considering the answer picked is the value out of the global variable.

    Example Capx

  • Thank you very much Kyatric !!! I own you a beer. Maybe two

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)