Problems with collisions, recycling, & booleans???

DrGlickertDrGlickert Member Posts: 1,135
edited November -1 in Working with GS (Mac)
I'm working on "recycling" some actors (we'll call them blocks) for my game. I'd like for the blocks to be "shot" then move out of the screen, only to return later.
What's the best way to set this up? I'm having problems with this;

I have an attribute on the block; self.InPlay = false
When it enters the visible screen I have it set to change to true in a rule (comes in from the top so when self.position.Y < 480 change attribute self.InPlay to TRUE OTHERWISE change attribute self.InPlay to false.

Followed by a rule that if InPlay = true then to collide with other blocks, shots, and walls (I'm assuming that the otherwise would be that it doesn't collide - this is my problem**)

If the block is hit by a shot I have a rule that does the following;
change self.InPlay to false, set alpha to 0, move to a random position above the scene, add to the score, then a timer that turns the alpha back on after a few seconds.

My problem is that the collisions are still there the blocks are now invisible but still colliding. Where am i going wrong here?!?! Am I wrong about the collisions not being turned off? If so, how do I turn collisions off?

Comments

  • QbAnYtOQbAnYtO Member Posts: 523
    booleans never work for me.. which is why i always use text attributes or integer
    but thats just me :(

    also make sure u check the "otherwise" sections. sometimes putting this in there can mess things up :/
  • DrGlickertDrGlickert Member Posts: 1,135
    This is really starting to get frustrating. This should work. I don't see where I'm going wrong with this one...
  • QbAnYtOQbAnYtO Member Posts: 523
    if you want u can send me the file and i'll see what i can do :)

    qbanyto @ gmail dot com
  • DrGlickertDrGlickert Member Posts: 1,135
    Thanks Obanyto, I'll let you know if I need to send it over to you. I'm going to work a few things and see if I can't trouble shoot it myself. Maybe I just need a few minutes away from it.
  • QbAnYtOQbAnYtO Member Posts: 523
    nothing like a breath of fresh air... i do this too :)
Sign In or Register to comment.