Is pre-attached On Screen button behavior working correctly?

Tepastelija

  • Posts: 51
Is there something wrong with pre-shipped onScreen button behavior? I have been trying to use it on multi-touch enabled and my game crash instantly when i touch screen when it's turned on..

Thing is, i have attached this behavior on one of my buttons and it really doesn't matter do i touch button or not. Game just crash instantly if i touch screen of my ipad.  I have tested game without button attached on screen and then it won't crash game when i touch screen, but instantly after i attach the button with pre-shipped behavior it starts crashing on touch. So something is not working correctly on that one..

ceosol

  • *
  • Posts: 2263
There are no preshipped behaviors. Anything you download from stencylforge or otherwise was made by someone else. None of it is guaranteed to work unless it is consistently kept up by the creator or community. My best advice is to start testing out your own methods for getting whatever you want to be done.

Tepastelija

  • Posts: 51
I'm sorry Ceosol, but that's just not true, at least acording to official stencylpedia:

http://www.stencyl.com/help/view/pre-shipped-behaviors/

It's one of the pre-shipped behaviors and imo it should be working one when it's part of stencyl.

ceosol

  • *
  • Posts: 2263
I stand corrected on the preshipped behaviors. However, I still believe in my suggestion for building your own.

« Last Edit: January 03, 2017, 12:53:34 pm by ceosol »

Tepastelija

  • Posts: 51
Yeah, i'm doing it as you suggested atm :) It would have been too easy to get it done with pre-shipped behavior anyway :)

ultram

  • *
  • Posts: 49
Hi! I have the same problem with the "On Screen button" behavior.  With the new build of stencyl my game crash when I touch the screen on iOS and Android.  Could you share your solution if you found one?

colburt187

  • *
  • Posts: 2394
There is a but with the touch ID list. You need to set it to "create new list" in the when created event. Or you can just add a 0 to the list.

ultram

  • *
  • Posts: 49
It's working just for one button. When i touch the second, my game crash.
Moreover, i deleted the code the Touch IDs attribute. How can i recover this code?

colburt187

  • *
  • Posts: 2394
I have attached a fixed version of the behaviour.

rob1221

  • *
  • Posts: 9430
The crashing issue should be fixed in b9319.  Also, I linked the touch IDs to a global map so changing scenes while pressing a button shouldn't cause issues any more (when multitouch is enabled).  For those without access to the latest build, I've attached the new behavior.

ultram

  • *
  • Posts: 49
Ok...the only thing is attached is a .png...
What do you mean?

rob1221

  • *
  • Posts: 9430
It's a magical png.
(File > Import Resource)

ultram

  • *
  • Posts: 49
yesssss it's magic...