Only collide after certain point on screen?

bluebyu25bluebyu25 Member Posts: 500
edited November -1 in Working with GS (Mac)
Hey all,

Again in my update switching to recycling instead of spawning I've hit a snag that I'm having trouble with. When you tap an actor and it changes its XY position to its original (except X is random) it sometimes knocks out the other actors waiting to come into the game when their conditions are met.

What would solve this is if I could set up a rule where any actor with tag (balls to bounce off) only is valid up to and below 350 pixels up on the screen (my game is in landscape)

Thanks

Comments

  • bluebyu25bluebyu25 Member Posts: 500
    Yes that works.

    Another question in you dont mind...

    On conditional actors...i have them move into the play field say every random 2-6 seconds. This was fine when I was respawning them....but now once I hit them they move back into the XY position I need it to but they just keep coming back down. Once they are hit....I only want them to come back down every random 2-6 seconds again. I tried changing their velocity to 0 for 1 second once they are hit...and that works...but if i put it to 2-6 random seconds it wont. The motion still just carries over.

    I hope this all really helps my optimization lol its difficult to pull this off when I developed the whole game vice versa
  • mangaroomangaroo Member Posts: 419
    When object is hit set a global attribute to change
    timer->change back

    While global attribute has not changed
    your random 2-6seconds rule
  • bluebyu25bluebyu25 Member Posts: 500
    Got it to work....thanks for the suggestion mangaroo but I didnt really know how to achieve that.

    What I did do that worked (Just for futures sake to help others) I set up a self attribute called touch. When touch is = 0, then every 2-6 seconds, change velocity to whatever.

    When the player hits the actor: change self.attribute.touch. to 1.
    change self.attribute.linear velocity x & y to 0.
    change self.touches back to 0

    That way, the process starts all over again.
  • mangaroomangaroo Member Posts: 419
    not too different :) you are right to use self though even better
Sign In or Register to comment.