0% Opacity versus Invisible?

0 favourites
  • 4 posts
From the Asset Store
Get Ready for the New Wave of "Bottom Screen" Games!
  • Several questions are related to opacity and invisible (and collisions)

    I have a TOUCH event on a sprite object...

    1- if my sprite object is at 0 opacity, will it still work on touch?

    2- if my sprite object is invisible, will,it still work on touch?

    3- if my sprite object has COLLISION DISABLED, will it still work on touch (or does this just effect collision with other objects)?

    4- if I have two TOUCH objects overlapping slightly, which object will work on touch (the top object?)

    Tagged:

  • You can easily test all these things yourself.

    1. 1. yes
    2. 2. yes
    3. 3. yes
    4. 4. If you touched two objects, "On touched object" event will be triggered for both objects.

    You can add "Is visible" or "Is collision enabled" or "Opacity=100" as a second condition to "On touched object" event, to exclude objects which you don't want to be touched.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Trust me Ive tested and tested and are getting mixed and inconsistent results... For example, the overlapping touchable sprites are hit and miss, and only work if I hit areas that don't overlap. So if all of these STILL keep the touch sprite "functional", what is the best practice to disable? Are you suggesting a IF statement (if visible, if opacity,...) I would have thought there would be a simple disable property. Thank you for your reply.

  • If you touch two different objects in the area where they are overlapping, then "On touched object" will be triggered for both of them.

    If you touch two overlapping instances of the same object, then this event will be triggered once, but will pick both instances. You can use "For each" inside this event.

    .

    Basically when you touch the screen, you touch all objects in this point, including invisible, with disabled collisions, on invisible layers etc.

    For example, if you have multiple buttons sprites on different layers (HUD, GameOver, GamePaused), you can do this:

    On Button touched
    Button: is visible
    System: Layer Button.LayerNumber is visible
    
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)