Scroll Menu?

Get help using Construct 2

Post » Thu Apr 18, 2013 1:43 am

I'm not sure how I'd go about this, but I'd like it so when the player presses Space it brings up 3 text objects, so I'd assume I'd do something like if
Keyboard>Space>Pressed | Text Object>Show/Visible?

But I'd like it so the top object is highlighted and the user can scroll up/down with their mouse and then press RMB to select that object.

For example:

Turret (Purchase Turret)
Barricade (Purchase Barricade)
Back (Hide/Close menu)

I'd also like it so when they purchase an item it replaces the mouse cursor so that when they press RMB again it places the object down in-game. I'd guess I spawn the object at where the mouse is, the only problem I'm having is changing the cursor from my custom cross-hair which disappears if I replace it.
Posts: 13
Reputation: 555

Post » Thu Apr 18, 2013 3:51 am

Hey Konkor,

You could use something like a tiled background object for the highlighting. Just make the box big enough to cover your text and set it to visible when you make your text show up.

I am not sure if the scroll wheel is supported to be honest I havent tried it. But you could change the highlighting objects position on the screen when the mouse is overlapping each of the text boxes.

For the mouse states, you want to have opposite conditions programmed (which you do by right clicking a condition like "is overlapping" and select invert). One for Cursor is overlapping text (and text is visible) = Use this cursor And one to check if the cursor isnt overlapping the same object = Use that cursor.

Alternatively, if you wanted the mouse state to always be a hand for instance when the text boxes are visible, you could add an instance variable and check that instead of checking if the mouse is overlapping.

So many different ways of doing the same thing. It's awesome.

Hope that helps.

GenkiGenga2013-04-18 03:54:47
Posts: 1,035
Reputation: 10,186

Return to How do I....?

Who is online

Users browsing this forum: hyem and 1 guest