Extend Touch plugin

0 favourites
From the Asset Store
A pixel art font with an extensive character set, perfect for retro style games
  • Touch plugin (and Mouse plugin too) desperately needs additional settings:

    This is how official Touch plugin works:

    valerypopoff.ru/construct/forumpics/touch-wrong.gif

    This is how it should work in almost all cases:

    valerypopoff.ru/construct/forumpics/touch-right.gif

    I addressed the issue here:

    construct3.ideas.aha.io/ideas/C3-I-584

    Ashley I already did it with the official plugin and it proved possible. I don't want to release the plugin that is an altered version of the official one. You don't want it either. Pleeeeeeease update the plugin.

  • This is a good idea.

    For Simplicity, may I suggest.

    • Enable / Disable as an Action instead.

    Properties:

    • Use Mouse Input
    • Touch Through
    • Visible Only

    And also Ashley, maybe this is a calling to support Behaviors for Single Global Plugins. So, we don't need to make our own separate from the Official Built-in Plugins like this, the Drag and Drop Behavior: construct.net/en/make-games/addons/91/bounded-drag-drop, Array, Dictionary and etc.

    Anyway, nice idea!

    This will surely be convenient for everyone. And not even confusing for beginners.

  • And also Ashley, maybe this is a calling to support Behaviors for Single Global Plugins. So, we don't need to make our own separate from the Official Built-in Plugins like this, the Drag and Drop Behavior: construct.net/en/make-games/addons/91/bounded-drag-drop, Array, Dictionary and etc.

    On Second thought. It can't solve everything, unless the Touch Plugin was designed to be modified by third-party addons, in which case, it isn't.

    Though, it could be more helpful for the Array and Dictionary plugins.

    But, I'm not sure if it is worth it.

    So, a feature request to extend addons might make more sense.

    Like this Touch Plugin Feature Request.

    Cheers.

  • Can't you just add conditions to an "On touched object" event to ignore any that are invisible or on invisible layers?

  • Why not extend "enable collisions" to touch as well?

  • Can't you just add conditions to an "On touched object" event to ignore any that are invisible or on invisible layers?

    Yes, I can just add conditions to an "On touched object" event to ignore any that are invisible or on invisible layers. But:

    1. To ignore objects that are on invisible layer, I'd have to make a condition "System: Layer Sprite.LayerNumber is visible":

    Or the same thing with LayerName. This is a bad practice because it all stops working the second I rename the layer or change the layers order in Layers Panel or move the sprite do a different layer. And if it breaks, it's sooooo hard to find this error.

    2. Checking if the layer or the object itself is visible is not enough. Sometimes objects you don't want to be touchable at the moment are technically visible (for example, under a popup). So to deal with that you should also make a condition "System: ×Layer 'Popup_Layer' is visible":

    It only makes things worse because now you have twice the chance of accidentally breaking everything. Also you have to check all possible popup layers if there's more:

    System: ×Layer 'Popup_LayerShop' is visible

    System: ×Layer 'Popup_LayerPause' is visible

    System: ×Layer 'Popup_LayerGameOver' is visible

    Not only should you check all these layers for visibility, you should also not forget to add a new check when you come up with the new layer sometime later (and you will).

    And don't forget that you have to do all of this with every touchable object in every layout that has touchable objects on at least two layers.

    And all of the above doesn't cover cases when two touchable objects overlap on the same layer. There's not much sense in triggering both of them when I touch the one that's on top of the layer when the one that's behind may not even be seen at all.

    3. No one wants to do all of that anyways. It's 1 in a 100 case when you actually need a tap to go through all layers and objects (even the ones that are invisible) and trigger everything it bumps into. This shouldn't have been a default behavior in the first place.

  • I´d love to see this option. Of course we can add stuff like this in the event sheet but as valerypopoff stated it can get tricky and complicated.

    Construct has the touch shoot through everything.

    Generally (with JS) the touch will stop at the first hit element (even if it doesn´t even listen to touch, can also be kinda annoying. I´m just glad "pointer-events: none" exists)

    Ideally it should stop at the first element in Z-order that also actually listens for a touch. Dunno if that´s feasible. Obviously the old behavior needs to stay so older projects don´t break, but I think optimally both the "go through everything" and "stop at first thing" should be useable at the same time in the same project somehow.

  • Ashley I messed up a bit.

    "System: Layer Sprite.LayerNumber is visible" works fine if you rearrange or rename layers. It stops working if you have Sprite instances on different layers, which is most certainly the case: imagine a close button that is the same on all popup layers. To deal with that you should also assign an instance variable to the Sprite and make it different for different instances so you can always check the visibility of a layer that contains a certain instance of the Sprite. This is messy.

    And if you try a different approach with "System: Layer 'Layername' is visible", then it gives you all the problems I described in a previous post.

  • What if in the project I need to interact with invisible and at the same time with visible objects? As I understand it, if in the touch plugin I put ignore invisible objects, then the whole system collapses?

    Everything that you wrote can really be done in events. And the meaning then? Let it be better not to bother their with this and concentrate on fixing bugs, and add really the necessary functionality in C3, which cannot be recreated in the code, such as offset for the tilebackground

  • Nice idea

    I always need to check if a object is visible, or if a layer, etc.

    If i have one box to simple check "no invisible" its very awesome.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Что, если в проекте мне нужно будет взаимодействовать с невидимыми и одновременно с видимыми объектами? Я так понимаю, если в плагине touch поставить игнор невидимых объектов, то вся система рушится?

    Все, что ты написал, действительно можно расписать в событиях. И смысл тогда? Пусть лучше не забивают себе этим голову, а исправляют баги, да добавляют действительно нужный функционал в С2, который нельзя воссоздать в коде, типа оффсет для tilebackground.

    Your attitude is why people hate russians in internet communities.

    1. The answer to your question "What if I need to interact with both invisible and visible objects" is obvious: do whatever you do now. Create the logic of telling visible objects from invisible ones. The setting "Ignore invisible objects" can't stop you from it. Just don't use it if you obviously don't need it. Your "what if" can't be an argument against what I propose.

    2. The mere fact that you can do anything with checks and events is never sufficient to deduct that we're good here. I never said that you can't recreate it with checks and events. I'm saying that when you do this, it's clumsy. I'm also saying that from my experience it's 1 in 100 case when what you need is a default Touch plugin behavior. You don't have a point here, man.

    3. And please don't do this "Let them do another thing instead". They know what they're doing. If you think that your feature request is more fancy, go create a topic about it and see if people need it.

  • q3olegka - please only post in English on the forum. We will start deleting posts which aren't English because it's difficult for us to moderate them. There are other unofficial forums for different languages.

    Your attitude is why people hate russians in internet communities.

    If you continue saying things like this you will get a temp ban. Be respectful.

  • Ashley

    corrected

  • Ashley did you decide anything?

  • We have limited resources and can't do everything quickly (even if I wish we could!)

    If people vote on the suggestion then we are more likely to prioritise it, otherwise there are currently dozens of other things we have in-flight and I can't guarantee when we can look in to anything else in particular.

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