On Touch Question
I have my game set up so that when you touch the screen the turret quickly turns to where you touched and fires. I want to set up a toggle button on the screen that switches weapons from a single turret to a double shooter or a triple shooter. But I dont want the current turret to fire in the direction of the toggle just because I pressed it to switch weaps. Is this possible?
PS. I should note that the turret is in the middle of the screen and can fire in a 360 range. its not like missile command.
Basically I want the current turret to ignore the touch. if its touching to switch weapons.
PS. I should note that the turret is in the middle of the screen and can fire in a 360 range. its not like missile command.
Basically I want the current turret to ignore the touch. if its touching to switch weapons.
Comments
Yes you can do this. Have a rule in the switch button that sets a boolean (switchpressed) to true when its touched and sets it back to false when its done the switch.
Then add a rule in your whole screen touch rule like :
when touched and switchpressed=false then do stuff (rotate and fire)
you might need to add a very short timer if it still rotates and fires such as :
rule when touched :
timer after 0.1 seconds
rule if switchpressed=false then do stuff