iphone touch control
markh72
Member Posts: 23
Hello
Really hope someone can help me on here
Im trying to make a shoot-em style game, where you drag the crosshair round the iphone screen with your finger, but it also has a trigger button sitting in the bottom of the screen (left/right side) how can i stop when the trigger is touched, the crosshair doesnt hover over or under it, need it to stay on the actor ?? also when im using collide or overlay, it just seems to collide, the crosshair doesnt hover over the actors ?
any tips greatly appreciated
mark
Really hope someone can help me on here
Im trying to make a shoot-em style game, where you drag the crosshair round the iphone screen with your finger, but it also has a trigger button sitting in the bottom of the screen (left/right side) how can i stop when the trigger is touched, the crosshair doesnt hover over or under it, need it to stay on the actor ?? also when im using collide or overlay, it just seems to collide, the crosshair doesnt hover over the actors ?
any tips greatly appreciated
mark
Comments
As for having the pression of the fire button stop the crosshair's movement. Create a game integer attribute called `stopcrosshair` or something.
Then do the following in the fire button:
`
Rule: when touch is pressed
--change game.stopcrosshair to (game.stopcrosshair+1)%2
otherwise
--Rule: when touch is released
------change game.stopcrosshair to (game.stopcrosshair+1)%2
`
In the crosshair actor do something like this:
`
Rule: game.stopcrosshair = 1
--change self.Physics.Movable to false
Otherwise:
--change self.Physics.Movable to true
`
Just so you know, none of that was tested as I am at work on a PC...but it should work. ;-)