Request - a way to turn off touch rightclicks

Discussion and feedback on Construct 2

Post » Wed May 29, 2013 8:13 pm

Why not just use buttons for everything?
Image ImageImage
B
171
S
50
G
179
Posts: 8,392
Reputation: 113,478

Post » Wed May 29, 2013 8:57 pm

@Ashley - An or block runs the conditions and actions of the event twice. Also, I thought there was some sort of restriction on or blocks preventing them from having subevents - but that doesn't seem to be the case anymore - was that changed at some point or am I remembering wrong?

@newt - because some games require input methods other than buttons?Arima2013-05-29 21:03:20
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Wed May 29, 2013 9:13 pm

Also, grabbing parameters from the touch object in a function called by the touch event doesn't seem to work. I suppose I could set them as parameters, but it just seems kind of clumsy in comparison, because then it's kind of hard to remember sometimes what value is set to what parameter and I have to keep looking it up. It also fragments the code tree and forgets picking.

I'd also like to be able to name parameters, but I seem to remember there was a reason you didn't want to do that, though I don't remember what it was. But I'll cast my vote for them anyway. ^^Arima2013-05-29 21:18:48
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Wed May 29, 2013 10:43 pm

OR blocks definitely don't run the actions twice, if they do that's a bug! They should also be working fine with subevents, I don't believe there was ever a limitation with that.
Scirra Founder
B
399
S
236
G
89
Posts: 24,530
Reputation: 195,402

Post » Wed May 29, 2013 11:34 pm

Found out what was causing the problem - I forgot to turn off 'use mouse input' in the touch properties, so the or block was running twice. Turning it off made it work properly. Should I file a bug report for that? It seems kind of logical now that I think about it, since the mouse and touch plugins were both registering the mouse click. At least it was simple.

So yeah, I guess using an or block is fine, and my request is unnessecary. Sorry for the trouble and thanks for the help!

I have no idea where I got the idea that subevents couldn't be used under or blocks though... Maybe misremembering something about how picking works when there are two conditions for the same object in an or block. :/
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Thu May 30, 2013 8:24 pm

@Ashley - It didn't work as well as I thought it would. Example:

On left click or touch start
- set sprite position to touch.x touch.y

If I left click, it places the sprite at 0, 0. This puts me back in the same position of needing two sets of code for the mouse and touch plugins.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 13 guests