Second Touch not recognized

Hi all,

i have a small problem that i want to fix and it is follow:

I have an actor (actor1) on the screen that must be pressed and hold down trough touch, and only when you hold it down you can spawn actors by touching on the screen on random positions. Now i have that when i press actor 1, and attribute1 goes to 1. When released attribute1 goes to 0.

I also have an invisible actor (actor2) that covers the whole screen, this one is use when: is pressed and atrribute 1 = 1, then spawn actor at mouse.position.x +mouse.position.y.

Both work perfectly on there own, but when i link them together like here above, it doesn`t work. I hold down actor1 and press anywhere on the screen (what would be actor2 because it covers the whole screen), it doesn`t recognize the second touch and doesn`t spawn anything.

Any idea how to solve this?

Hope my discription is clear, my english isn't that awesome.

Thank you in advance

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Your English is good! Can you post a screenshot of your rules for each actor? It sounds like you have it set up correctly but without seeing your rules it is hard to know. Instructions for posting a screenshot are in my signature below.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • vixion1337@gmail.comvixion1337@gmail.com Member Posts: 6
    edited February 2013
    The project is much bigger then i described here above, but everything else works so so all other atributes are working, i know that for sure. Because when i only use one finger and remove condition for atribute1(energy.touch), it spawns everywhere i touch. But also when i first hold down somewhere else on the screen with my finger and then try to use an other finger to spawn them, it again, doesn`t work, even without the atribute1 condition.


  • vixion1337@gmail.comvixion1337@gmail.com Member Posts: 6
    edited February 2013
    image

    image
  • JarrenHJarrenH Member Posts: 206
    You have to use touch rules, not mouse rules. Touch rules can control multiple touches on the screen.
  • vixion1337@gmail.comvixion1337@gmail.com Member Posts: 6
    edited February 2013
    they are touch rules?! see the screens above.
  • vixion1337@gmail.comvixion1337@gmail.com Member Posts: 6
    edited February 2013
    Hmm this discoverd something wierd, for some reason it will work when i reverse it, i first spawn an actor by touching on the screen and i hold my finger there, and when i then touch actor1 with an other finger it recognizes that touch... But i need it to the other way around.

    Even when i begin from scratch and try to make this core mechanic work, it doesn't work, it only works in reverse order...

    i am totaly lost, but i think i know what the problem is, only i dont know to solve it. Because i also discoverd then when i remove the condition of mouse.postion.x <280, i kinda works, but then the actor spawns where i put and hold my first finger when i touch the screen with my second finger and not where i touch it with my second finger..

    i am realy lost.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You have two other attributes in that second rule. How do you know that they are within the range to trigger that Spawn Actor behavior? Have you placed DisplayText actors on the screen to see the value of those two other attributes?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • vixion1337@gmail.comvixion1337@gmail.com Member Posts: 6
    edited February 2013
    I just fixed it, JarrenH his comment made me think about the mouse.position.x/y spawinng location and chanced the rule of actor2:

    when game.energy.touche is 1 spawn actor at game.touches.touch 2.x + game.touches.touch 2.Y

    This did the trick, but i feel its an unnecessary solution and it can be done easier. But thank you for offering your help :) You can close or remove this topic now. Feel like i posted it to early maybe as i just fixed it within the 2 hours i posted it, sorry for that.
  • JarrenHJarrenH Member Posts: 206
    Sorry, that was my abreviated explanation. Thats what I meant, using touch 2. If you think about it, it makes sense. While the mouse position works for touch, it limits it to one touch input. Thats why we have seperate Touch 1, Touch 2, Touch 3... rules. It is cumbersome, but I can't find away around it either. (The game I'm working on requires up to 5 touches on the screen at once, the logic is quite confusing.)
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited March 2013
    There isn't any easy ways as what you are doing is multi touch. In this video I explain the complexity of multi touch.

Sign In or Register to comment.