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

0 favourites
  • 8 posts
From the Asset Store
Experience the true heartbeat of combat with "Combat Hits - Hand To Hand Fighting SFX."
  • <center>Construct 2 r67

    Windows 7 x64 Pro

    Chrome 15</center>

    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.capx

  • 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.

  • Thanks Kyatric for all the help!

    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".

    Oooooh OK. Seems a bit obtuse but seems like that's the way the system does things. <img src="smileys/smiley29.gif" border="0" align="middle" />

    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?

    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.

    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

    You have a nice interface/GUI, very sober and well thought.

    Thanks! It's a work in progress though. <img src="smileys/smiley9.gif" border="0" align="middle" /> Final version will probably be darker. Same structure though.

  • Oooooh OK. Seems a bit obtuse but seems like that's the way the system does things. <img src="smileys/smiley29.gif" border="0" align="middle" />

    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?

    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.

    While I'm here, is there a way to determine which specific CutscenePreview is clicked?

    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...

    Oh and maybe one more thing, is it possible to link an object to a URL?

    The browser object allows you to open a tab/use the current page to an url you specify.

  • 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...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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...

    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.

  • 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 ?

  • Ah OK, that makes sense. Sorry. :)

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