Having some issues (Cursor: hand & Go to layout)

Bugs will be moved here once resolved.

Post » Sun Nov 13, 2011 5:20 am

Construct 2 r67
Windows 7 x64 Pro
Chrome 15


So I've been in the process of porting my game 4kg to Construct 2. Right off the bat, menu creation was insanely easy compared to the solution I was using before. That's good.

Unfortunately I've encountered two bugs; one is cosmetic, but one affects actually getting into the game to play.

Bug A: Mouse cursor = hand

It seems like mouse cursor = hand does not get applied when other events sheets doing the same are included into another sheet, or vice versa. On the live link below, "Play" and "Cutscenes" on the main menu should have the hand cursor, but only "Credits" does. In the "Cutscenes" menu, the back button doesn't have it and it should. This bug is slightly annoying and a UX concern (at least on devices with mice.)


Bug B: Go to layout

If you check the live link below, you'll find if you press the Play button on the main menu, you go straight into (pre-alpha) gameplay. That's good. When you do this, a record is saved in LocalStorage. Refresh the game. Now when you press play, you're brought to the World Select screen. Clicking any one of the fuzzy TVs should boot you back into gameplay, but instead nothing happens. The clicks do not do anything. Hopefully I'm not missing something obvious here.


I've also included the capx of course, so you all can take a look at it. Any help or feedback would be appreciated, thanks.

Live: http://andrewrabon.com/games/4kg/
Source: http://andrewrabon.com/games/4kg/4kg.capxAndrex2011-11-13 05:21:17
B
23
S
5
G
4
Posts: 29
Reputation: 3,718

Post » Sun Nov 13, 2011 5:56 am

For the hand cursor I had the same "bug". It's code/logical bug though.
When your cursor is over the Play button, it is also not over the CutScenes and Credits button, so as the events are read from top to bottom, the test for the CutScenes button works as the only "not over" condition is false.

The solution is to save 2 events and have a single common "Not over" condition testing if the mouse isn't over the three buttons. If it is not, then the cursor is to be "normal".

For the bug B, your layout WorldSelect is linked to the event sheet CutScenes.
CutScenes includes WorldDisplay which include back.
But in all this, the click condition is set in "WorldSelect" event sheet, which is not included.
Include it in CutScenes for example, and here your screen takes you to MC-1.

You have a nice interface/GUI, very sober and well thought.Kyatric2011-11-13 05:58:24
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,998
Reputation: 57,791

Post » Sun Nov 13, 2011 6:19 am

Thanks Kyatric for all the help!

[QUOTE=Kyatric] For the hand cursor I had the same "bug". It's code/logical bug though.
When your cursor is over the Play button, it is also not over the CutScenes and Credits button, so as the events are read from top to bottom, the test for the CutScenes button works as the only "not over" condition is false.

The solution is to save 2 events and have a single common "Not over" condition testing if the mouse isn't over the three buttons. If it is not, then the cursor is to be "normal".[/quote]

Oooooh OK. Seems a bit obtuse but seems like that's the way the system does things.

How would I do this specifically? Add two conditions to one of the already existing "not over" events? Add a sub-event? Or some other way entirely?

[QUOTE=Kyatric]For the bug B, your layout WorldSelect is linked to the event sheet CutScenes.
CutScenes includes WorldDisplay which include back.
But in all this, the click condition is set in "WorldSelect" event sheet, which is not included.
Include it in CutScenes for example, and here your screen takes you to MC-1.[/quote]

Ah sweet! It was just me then. Sorry for the false alarm! While I'm here, is there a way to determine which specific CutscenePreview is clicked? Or do I have to manually make sure they're all different objects (no cloning)? Because obviously, the intent is that clicking different Previews leads to different worlds.

Oh and maybe one more thing, is it possible to link an object to a URL? I would like to do that for the music artists. If not, then that's my next feature request. :P

[QUOTE=Kyatric]You have a nice interface/GUI, very sober and well thought.[/QUOTE]

Thanks! It's a work in progress though. Final version will probably be darker. Same structure though. Andrex2011-11-13 06:21:00
B
23
S
5
G
4
Posts: 29
Reputation: 3,718

Post » Sun Nov 13, 2011 9:02 am

[QUOTE=Andrex] Oooooh OK. Seems a bit obtuse but seems like that's the way the system does things.

How would I do this specifically? Add two conditions to one of the already existing "not over" events? Add a sub-event? Or some other way entirely?
[/quote]
Implementation is up to you. I'd go with setting the "not over" event in "Credits" group.
Or create a specific group for this event to keep parts separated as you did so far.

[QUOTE=Andrex] While I'm here, is there a way to determine which specific CutscenePreview is clicked? [/quote]
Create an instance variable to the object CutscenePreview (ex index) and set a different number to each instance.
From there you can make subevents under the event "On cutsecenes clicked" to test the value of cutscenes.index and so send to the correct layer.
ex:
+ Mouse.On CutScenePreview clicked
++ CutscenePreview.index = 1
++=> goto layout MC-1.
++ CutscenePreview.index = 2
++=> goto layout MC-2.
etc...

[QUOTE=Andrex] Oh and maybe one more thing, is it possible to link an object to a URL?[/quote]
The browser object allows you to open a tab/use the current page to an url you specify.
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,998
Reputation: 57,791

Post » Sun Nov 13, 2011 10:35 pm

Wow thanks, all my issues have flown away now. :) This program is more useful than I give it credit for.

Alright, enough faffing about with menus. Time to get into the levels...
B
23
S
5
G
4
Posts: 29
Reputation: 3,718

Post » Thu Dec 15, 2011 4:31 pm

[QUOTE=Kyatric]
Create an instance variable to the object CutscenePreview (ex index) and set a different number to each instance.
From there you can make subevents under the event "On cutsecenes clicked" to test the value of cutscenes.index and so send to the correct layer.
ex:
+ Mouse.On CutScenePreview clicked
++ CutscenePreview.index = 1
++=> goto layout MC-1.
++ CutscenePreview.index = 2
++=> goto layout MC-2.
etc...
[/QUOTE]

OK, so setting a different instance variable on each one isn't working. It's persistent across all instances of the object instead of local to each object.
B
23
S
5
G
4
Posts: 29
Reputation: 3,718

Post » Thu Dec 15, 2011 8:09 pm

All instances share the same variable (have this variable has part of their reachable properties).
But the value of the variable is different for each instance (as long as you setted a different value for each instance).

A quick look at the manual might help ?
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,998
Reputation: 57,791

Post » Thu Dec 15, 2011 10:38 pm

Ah OK, that makes sense. Sorry. :)
B
23
S
5
G
4
Posts: 29
Reputation: 3,718


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests