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

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    You should use the method of pause tshirt did a video on not the pause screen.
  • WhackojackWhackojack Member, PRO Posts: 20
    Can you elaborate or share a link?
  • WhackojackWhackojack Member, PRO Posts: 20
    I watched the video and it seems like a great idea, however it doesn't stop animations. I'm currently working out a method with actors that scroll along the screen with the character and record what side of the screen the character is on. it's working well, but I'm still ironing out some inconsistencies with that method.
  • WhackojackWhackojack Member, PRO Posts: 20
    @FryingBaconStudios

    After running into multitudes of problems with my method I decided to try the custom pause method, however, I'm running into the same problems. Please if anyone can answer how to get game.touch1x = scene position x as opposed to screen position x
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited September 2012
    I remember tshirt did a video similar to your problem. I believe it's part of the cookbook videos. This might point you in the right direction. It deals with touch on large screen projects.



Sign In or Register to comment.