Cannot get target system to work

WhackojackWhackojack Member, PRO Posts: 20
edited September 2012 in Working with GS (Mac)
I'm making a side-scrolling beat em up style game. I'm running into an issue where I want one of the attacks to pause the game and bring up a screen where you can place a target where you touch. When it's confirmed the attack will land in the targeted area. I have it working fine when the screen is stationary (my dimensions are 1200x320), and when it begins scrolling to the right. However, I run into issues when you start to head back over to the left.

-Currently, I have it so when you press the button the game will pause and take you to the targeting screen.
-I have it set up so that the target will be constrained to Touch1 X and Y. Finally, when it's confirmed it will change Target X,Y to be equal to Touch1 X, Y, and change the attribute AttackActivate to true.
-Once unpaused the character will react to AttackActivate to true by spawning the actor and hitbox at Target X,Y.
-The screen begins to scroll around at around X=380, so I have a rule in place to take effect before the actor spawns.
-game.Player X > 380 change attribute game.Target X to game.Target X +(game.Player X-380).
This solves the issue with the scrolling entirely.

Then I ran into the issue of scrolling back. It seems like once it starts to scroll back it disregards all other rules and just spawns at Target X,Y with no modifiers no matter what I do.

Thanks in advance for any direction on this, Cheers :)

Comments

Sign In or Register to comment.