Help: multi touch to stop, multi touch again to resume with original velocity

Pretty much in the title. How would I make it so that when you touch the screen with 2 fingers the actor stops and when you touch again with 2 fingers it continues with its original speed and direction?
Also, how would I test the multi touch in the gamesalad creator on my mac?
Also, how would I test the multi touch in the gamesalad creator on my mac?
This discussion has been closed.
Comments
In the actor that you stretched over the scene have a rule if touch is pressed and devices.touch.count =2
change attribute stop to (stop+1)%2. That will toggle it between 1 and 0.
Then in the player actor have a rule when stop=1 change attribute playermotion x to motion linear velocity x and change attribute playermotiony to motion linear y. Then have a timer with after .1 seconds with run to compeltion checked, and put 2 change attriubtes in that timer. Change motion linear x to 0 and motion linear y to 0.
Then have one last rule in the player when attribute stop=0 change attribute motion linear x to playermotionx and motion linear y to playermotiony
hope i helped
1. So how do I test this on my mac, as I can hardly use touch controls, or do I have to set other controls so I can play my game in gamesalad?
2. Is there a way to know where the player is touching in the scene? For example, so you can spawn an actor where the player touches?
The rule thats when touch is pressed and touch count equals 2 you can change to when key b is down and key y is down or something like that.
And for the second question your gonna be using that invisible actor thats stretched over the whole scene. In that actor have when touch is pressed spawn actor, in the spawn actor behavior in the x position go back into the devices attributes go back into touch go to touch 1 and choose x. Then in the y position go threw the device attributes again youch 1 and choose y. And make sure its relative to the scene in the spawn behavior
cheers
closed and reporting you now.