Mobile on screen button doesn't work.

purplelava

  • Posts: 82
The included On Screen Button behavior doesn't bring results on my Android device. It works perfectly by clicking in flash, but when on Android, it works whenever he feels to me.

I touch the button, keep it pressed, but works seemingly randomly. I am trying simply moving an actor. The actor eventually moves, according to rules that mistify me. I tap and hold and sometimes it moves, most it doesn't.

This makes it impossible for me to move on developing my mobile game. I do like Stencyl and its ease of use, but things like that make it impossible for me to finalize the goddamn mobile prototype I intended to produce...

Why don't the default projects even work? You can find On Screen Button not working in the "Platformer" iOS example included with Stencyl. Once exported to an Android phone, they simply don't work. I've seen they're old versions of the behavior, but it doesn't change anything. I succeded making buttons work on Android by simply detecting mouse clicks, but this doesn't allow me to use multitouch.






sdieters

  • Posts: 2068
It doesnt change anything? Since we are now uaing a totaly different language then the old version it matters allot.

have you tried google to find any tutorials for this? Because i know there are tutorials regarding to touch movent and activation for stencyl, mainly because i created them =)

My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

purplelava

  • Posts: 82
I am going to find your tutorials then. Let's see if I can manage to make it work.

 

purplelava

  • Posts: 82
But still, the On Screen Button behavior simply doesn't work on my Android, and it's made of up-to date blocks...

sdieters

  • Posts: 2068
What android do you have? Model and inch?
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p


MikeyPB

  • Posts: 107
Just a thought:

...this doesn't allow me to use multitouch.

If you're trying to use multitouch, are you using the new multitouch event and blocks?

purplelava

  • Posts: 82
That's what I'm saying. I can work only by deteacting mouse clicks, but the multitouch behavior don't seem to work properly. I have just tried the included "on screen button" behavior which uses those block, and they dont' work as expected. Why?

sdieters

  • Posts: 2068
Have you read the documents? it clearly says that Mouse Events are not multitouch events. and that you should not mix single touch and multitouch events.

If you want to use multitouch, you need to start researching into multitouvh events. My tutorials cover up allot of that matter =)
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

purplelava

  • Posts: 82
Sdieters, you don't seem to have understood me. I perfectly know that mouse click events do not allow for multitouch. What I am saying is that the standard "on screen button" behavior in Stencyl - if you've never seen look it up, it's one of those standard ones you can add to any actor/scene - does not work in my Android device for reasons I cannot fathom.

You say I can't mix the multitouch blocks with standard mouseclicks. Well maybe I was still using mouse click blocks in OTHER behaviors, you say I cannot do that as well?


sdieters

  • Posts: 2068
I looked at the standard on screen button behavior, and it does exactly what you are not supposed to do because it has both mouse and touch events. I never work with premade behaviors, and it is better to ask how you should do something and learn from it so next time you can do it yourself =)

The main rule is, never use both mouse events and multitouch events in the same project. This can cause weird issues which you might have now.
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

purplelava

  • Posts: 82
...so Stencyl ships with a behavior which does not work? A wrong behavior? I did not expect that.

Yes, definitely I will learn to use the multitouch events. I just wanted a basic operative prototype on my device before rolling my sleeves and getting to learn touch IDs.

Thanks sdieters, you might have spotted the problem. Will make use of your tutorial.

So weird a standard Stencyl behavior is all wrong, and also so many game samples Stencyl ships with don't work. This is confusing for a beginner.

sdieters

  • Posts: 2068
None of these behaviors are made by Stencyl, but by other users. Everyone can upload to the StencylForge.
Learning Touch ID's isnt that tough, so don't worry. You will get it quick enough =)
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

rob1221

  • *
  • Posts: 9473
I've used the standard on-screen button behavior in a couple of my games before and it worked as expected, although that was some months ago and it's possible that the behavior broke since then.  Behaviors included with Stencyl are not tested when updating Stencyl and are only looked at when users show that they are broken.

purplelava

  • Posts: 82
well...it doesn't work to me, so maybe they want to look at it. But in the end what matters to me is that the program -- the blocks and the editor -- work.

Thanks a lot sdieters.