Playmaker Forum

PlayMaker Help & Tips => iOS Help => Topic started by: Shirts on March 22, 2014, 03:51:39 AM

Title: Dividing the Screen into Two "Buttons"
Post by: Shirts on March 22, 2014, 03:51:39 AM
I'm trying to divide the screen into two invisible multitouch "buttons". I want Side A to perform ActionA and Side B to perform ActionB.

And also they need to be pressed simultaneously if need be so ActionA and ActionB can trigger at the same time.

If anyone can point me in the right direction, I will send you a candy bar. =)

Title: Re: Dividing the Screen into Two "Buttons"
Post by: Graham on March 28, 2014, 09:20:24 PM
You could use a guitexture, one to cover each side, once they are in place simply set the texture to "none" to make them invisible. Once this is set up, give each one a "Touch Gui Event" action, and set the "touch began" event to trigger whatever state you need.
Title: Re: Dividing the Screen into Two "Buttons"
Post by: Neoisrael on April 08, 2014, 08:45:14 PM
If i were u i would set the touch screen to detect where the touch happened, as u know the screen is devided, so 0.5 on x and 0.5 on y is the ezect middle, if i would to do this i would set that when touch on x axis > 0.5 do actionA  when touch on x axis < do actionB

And if u want them to be clicked togther u will have to set a seperate fsm for each one of the sides that will send a bool change and if the 2 bools are true do the combined action

Hope this helped