0 Favourites

on object clicked doesn't work

  • I've created a little game. If you go from the game to the menu without levelling up, it works fine. But if you just went up 1 level and then hit [ESC] or died, your no longer able to start the game!

    I've tried several things, but i can't get it work. Does anyone knows how to fix it?

    Here's the file

    P.S.:I hope you don't mind my bad english. I'm german.

  • First of all - nice Game Idea!!!

    Second, I think it's weird to shoot with "W"...

    AND finally, if you die your game should jump to "Over" not to "Menu" - at least this is what the CAPX says BUT in "Over" you use "On Key Down" to then jump to "Menu"....bad idea - change this to "On Key pressed" and it should work as expected!

  • Thanks for the fast reply, it's better now. But it hasn't fixed my problem. Example number 1: I start the game, press [ESC], see my level is 1,and press [ESC] again. Now i can start the game by clicking on start.

    Example number 2: I start the game and play a while. I level up (no matter how many) and die/press [ESC]. On the game over screen i see, that my level is higher than one. I press [ESC] again, but now I can't click anything in the menu! That's my problem.

  • Right now....I am ideenlos....

    Now clue. The correct Eventsheet is drawn and executed. The mousevents (Cursor is over...) Works, but either the "click" is not recognized, or the "go to" does not work...

    Need more time to do some more debugging

    ....ok, it seems, that it is the "go to", that's having hick-ups

    Maybe KYATRIC has a helpfull idea

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • It is weird behavior. I've deleted everything except layouts Game and Menu and it works correclty. Then I load capx again and did exactly the same and it's not working :)

  • Zral - Maybe you should report it as a bug?!

  • I get a js bug 'cause you toggled off two for loop at start of frame (GameSheet event 2 and 3) but still refer to loopindex in the action.

    Just delete that part. Didn't test it but that might be the issue.

  • Aahhhh! Thanks alot! I've already had some bad experiences with inactive events, but i didn't recognized it.

    What we've learned: Delete events instead of toggling them off.

  • No need to throw toggling into the pit of obliviousness, toggling is usefull and not that buggy.

    But you should either toggle an entire event or some specific actions.

    Toggling a condition is seldom use.

    It's only usefull if you want to rapidly compare two conditions without deleting any.

    The difference between toggling a condition and an entire event, in the UI, is that when you select a condition you only see the condition outlined whereas when you select an event the entire condition+action block (+ eventually sub-events) should turn yellow.

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