Suggestions on how I should code these crosshairs?
BackUpAndDown
Member Posts: 685
I'm currently working on a basic click-to-shoot game but i'm having trouble with the crosshairs...
http://gamesalad.com/game/play/83778
The crosshairs are pretty much just for show, it's the actual clicking on the enemy that destroys them. But I want the crosshairs at least close to the alien when he's killed. =P
It also seems if you do a kind of dragging motion the crosshairs will fly off the screen... Coding suggestions would be appreciated.
On a totally separate note, what do you think of the graphics? I made the game on the Iphone landscape template so when it was enlarged for web they kinda got blurry.
http://gamesalad.com/game/play/83778
The crosshairs are pretty much just for show, it's the actual clicking on the enemy that destroys them. But I want the crosshairs at least close to the alien when he's killed. =P
It also seems if you do a kind of dragging motion the crosshairs will fly off the screen... Coding suggestions would be appreciated.
On a totally separate note, what do you think of the graphics? I made the game on the Iphone landscape template so when it was enlarged for web they kinda got blurry.
Comments
http://gamesalad.com/game/play/39007
Constrain attribute self.position.x to game.touch1x
Constrain attribute self.position.y to game.touch1y
The touch1x and 1y are located in the devices bit of the drop down.
That's it, it'll appear wherever you touch now.