Context menus in game

Get help using Construct 2

Post » Sat Oct 22, 2011 9:00 am

Hi all,

Investigating a move from Gamemaker to Construct2 and i've been really happy with what i've managed to do so far. Physics integration is waaay easier in C2.

However, i'm a little stumped by something... not sure if i'm missing the plot or if it really isn't there.

I need to pop up an in-game context menu with options for the current object i'm interacting with and for the life of me I can't find anything that will allow me to set up a menu, let alone a context-sensitive one. I don't mind getting my hands dirty with javascript if need be, but the integration points between the in development game and the external environment are a little hazy for me at this point, and I don't seem to be able to apply an arbitrary script to an event.

Has anyone tried this before? I can't find anything on the forums, apologies if something is there and I haven't looked hard enough, but this is a massive showstopper for me!

Thanks in advance,

shrike71
B
6
G
1
Posts: 5
Reputation: 889

Post » Sat Oct 22, 2011 11:24 am

Challenge accepted:
Original from 2011 http://dl.dropbox.com/u/36472942/construct/forumhelp/ContextualMenu.capx
edit 2016 version (release 237) : https://dl.dropboxusercontent.com/u/36472942/construct/forumhelp/ContextualMenu_2016.capx

An implementation through events of a contextual menu.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Sat Oct 22, 2011 11:34 am

Bloody brilliant! Just what I was looking for. I think i'll get the early adopter now!

Thanks a million and keep up the great work

Shrike71
B
6
G
1
Posts: 5
Reputation: 889

Post » Sat Oct 22, 2011 7:24 pm

@kyatric you never cease to amaze.
B
52
S
17
G
15
Posts: 1,029
Reputation: 26,339

Post » Sun Oct 23, 2011 2:49 am

Yeah, very cool stuff! I was wondering how that could best be done myself.
B
126
S
7
G
4
Posts: 185
Reputation: 7,233

Post » Mon Oct 24, 2011 11:57 pm

Alt

capx

Not quite as elegant, but still effective.

Right click on the potion.droptank212011-10-25 00:02:34
B
22
S
9
G
3
Posts: 203
Reputation: 3,647

Post » Thu Sep 20, 2012 7:16 pm

@Kyatric, very cool and am going through it now, thanks as always.

@droptank21, thanks but I am getting a 404 error on your links.
B
28
S
4
G
3
Posts: 70
Reputation: 4,879

Post » Wed May 08, 2013 12:30 pm

After update SC2 to release approximately 127 this example doesn't work because objects can't be created and be used in the same event simultaneously
B
11
S
1
Posts: 1
Reputation: 1,090

Post » Fri Jul 11, 2014 12:25 pm

Hi,
I'm new to CS2, but having fun working through the FAQ examples.

I've updated Kyatrix's context sensitive menu so that it works on CS2.
Any bugs are my own, please let me know if it is useful (or where broken!)


Can download from http://web2.mrexcessive.net/Construct2/CAPX/ContextualMenu.capx

Cheers
B
9
S
3
Posts: 23
Reputation: 646

Post » Sun Jul 13, 2014 8:07 pm

@Kyatric, would you kindly remove or update the link to your capx. It doesn't function in the current C2 versions ... this would save the trouble. Many thanks for all your work here!

@mrexcessive -- thanks for the update!
B
11
S
2
Posts: 86
Reputation: 1,001

Next

Return to How do I....?

Who is online

Users browsing this forum: djcrazypants, marekmk and 6 guests