How do I implement a choosing the answer by cursor?

Get help using Construct 2

Post » Sun Oct 04, 2015 8:51 am

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 :)
B
16
S
2
Posts: 60
Reputation: 984

Post » Wed Oct 07, 2015 10:08 am

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
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
294
S
117
G
96
Posts: 7,313
Reputation: 71,094

Post » Wed Oct 07, 2015 1:34 pm

Thank you very much @Kyatric !!! I own you a beer. Maybe two :)
B
16
S
2
Posts: 60
Reputation: 984


Return to How do I....?

Who is online

Users browsing this forum: NN81 and 19 guests