dop2000's Forum Posts

  • There is something else wrong with your code or layouts then

  • I don't think you need Solid. It's changing to "On Collision" event that fixed it.

  • You do not have permission to view this post

  • Do you have S_Entrée_01 sprite on the second layout?

    C2 runs only one layout at a time and two events can't be triggered if there is no S_Entrée_01 sprite on the layout.

    I suggest you run your game in Design Mode and check everything thoroughly.

    If you still can't fix it, please share your .capx file

  • Banatawa

    Run your game in Debug mode (Ctrl-F4) and check how many character instances you have on each layout.

    Also you will be able to see where each character is.

    It is possible that your character gets duplicated because you set it as Global. If this is the case, remove character sprite from the second layout.

  • Really cool demo, Bruno!

    I actually played it for almost 10 minutes just because the snake moves so nicely!

  • Just add System->Set Group "Buttons" Inactive to all events where you make that layer invisible.

    And add System->Set Group "Buttons" Active to the event where your character dies.

    By the way, you shouldn't have Mouse-Clicked and Touch-Is touching as two conditions of the same event. On a touch device it will never work. Even if you change it to "Or" block, it will still be bad, as "Is touching" condition is continuous and triggers every tick while the finger is touching the screen.

    I would move the code into a function "RestartGame" and create two different events, one Mouse-Object Clicked, and another Touch->Object touched, both calling that function.

  • Have you tried Pin behavior?

    Pin Body0 to Head (bar or rope style), Body1 to Body0 etc.

  • Oh, sorry, then you should check if the layer is visible, not the button.

    But as I said, it's better to disable the entire group of events.

  • Do what?

  • You can simply add another condition to your click event:

    Mouse -> Clicked on MenuButton

    (and) MenuButton Is Visible

    Or a better solution would be putting all menu events into a separate group "Menu Events" and disabling this group when it's not needed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If it starts and not ticking down, then blackhornet is probably right - your timer is restarting again and again every tick.

    You can add some debug output (for example Browser->Log "timer start") to check if this really is the case.

    You need to update conditions in this event to make it trigger just once.

  • redfoc

    R0j0 recently uploaded a great demo in this post:

  • I think I used only the first one.

    But you can install CSV2Array and CSV2Dictionary as well.