add touch without OR

Get help using Construct 2

Post » Thu Jan 30, 2014 11:09 am

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 (:
B
5
Posts: 34
Reputation: 322

Post » Thu Jan 30, 2014 11:21 am

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 thoughGuizmus2014-01-30 11:28:07
B
17
S
8
G
4
Posts: 473
Reputation: 6,221

Post » Thu Jan 30, 2014 11:48 am

uuuu, just the touch works as a click, it already solves everything, was hitting me a bit with the other solution haha
thank you (:
B
5
Posts: 34
Reputation: 322

Post » Thu Jan 30, 2014 11:53 am

It does work in a similar fashion, but you could just have Touch and Click call a function. That would be the best way
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,701

Post » Thu Jan 30, 2014 11:54 am

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...
B
17
S
8
G
4
Posts: 473
Reputation: 6,221

Post » Thu Jan 30, 2014 12:10 pm

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

anyway, thanks. (:
B
5
Posts: 34
Reputation: 322


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests