Mouseclick x/y reporting bug?
So I'm experimenting with a movement control interface for a platform jumper where the character moves towards where you tap/click on the screen. In the final iPhone version it will be a tap, but I'm subbing click for testing at the moment.
Right now I have a 'dummy actor' that teleports to wherever you click. The character actor then accelerates towards the dummy actor. In testing the dummy actor will not go anywhere further right than about 200pix. This is insanely annoying and makes my game interface completely not work. I've triple checked the code and all I can figure is that GS mouseclick x/y reporting has a bug.
The code I have says:
Actor1
Rule
Actor recieves mouseclick
change globalattribute.x to mouseposition.x
change globalattribute.y to mouseposition.y
Actor2
Accelerate towards globalattribute.x, globalattribute.y
but mouseposition.x never goes above about 200.
Grr...
Right now I have a 'dummy actor' that teleports to wherever you click. The character actor then accelerates towards the dummy actor. In testing the dummy actor will not go anywhere further right than about 200pix. This is insanely annoying and makes my game interface completely not work. I've triple checked the code and all I can figure is that GS mouseclick x/y reporting has a bug.
The code I have says:
Actor1
Rule
Actor recieves mouseclick
change globalattribute.x to mouseposition.x
change globalattribute.y to mouseposition.y
Actor2
Accelerate towards globalattribute.x, globalattribute.y
but mouseposition.x never goes above about 200.
Grr...
Comments
If so you need to add a offset for the camera
I have no audio because I just upgraded to Snow Leopard and I got the 'no sound' bug. So I have no sound. I've been trying to fix the damn thing for the past hour. The webernetz says to delete my audio.plist file in the prefs folder but there isn't one there so I'm SOL until the Mac store opens up and I can goad some answers out of a smarmy disinterested twenty-something. If only Win/PC weren't more evil than Mac :P
I try to stay away from any "constrain" behavior in any of my games because they eat up so much CPU.
Sigh.