0 Favourites

add touch without OR

  • Is there any way to add a touch around the place that has the click of a quick way?

    'm going condition by condition and adding an "or touch" in all clickable objects, which caused me a problem:

    I have conditions that are:

    if click on the object

    if enable collision

    do ...

    when I put the touch in the way that usually (add an "OR") OR he leaves for all conditions, including "if enable collision"

    in short, have an event with 3 conditions, but I want only 2 of them with OR

    or a more easy than to put the function of touch in all my clickable objects form

    someone?

    tks (:

  • You could put all those "clickable" objects in a family, and have something like

    On click on Clickable

    OR

    On touch on Clickable

        Then call Function("Click",Clickable.UID).

    Now, every time you have an event that was triggered by an "onclick" on an object X, replace it by :

    On function "click"

    X->Pick by UID (Function.Param(0))

    (Other conditions, like If enabled collisions, ...)

    You will this way have the "OR" you needed, but you will keep a "AND" context everywhere you need.

    EDIT : I might be mistaking, but I think a "on touch" triggers a "on left click" also, meaning you would just have to change all the on click with on touch. To be verified though

  • uuuu, just the touch works as a click, it already solves everything, was hitting me a bit with the other solution haha

    thank you (:

  • It does work in a similar fashion, but you could just have Touch and Click call a function. That would be the best way

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Nice if it helped :) And for the first solution, don't bother, I see you don't have the full edition for now so you don't have families anyway...

  • i using a complete version of a friend for test, I will buy my soon...

    anyway, thanks. (:

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