[help] Destroy and respawn platform problem

networnetwor Member Posts: 89
edited November -1 in Working with GS (Mac)
Hi, I've got problem again :(. So, I've got attribute destroy.
In actor destroyable_platform i have a rule:
If attribute game.destroy = false - collide with actor player
Then if is player colliding with platform after 2 seconds destroyable_platform change self.color.alpha to 0 and game.destroy to true.
So, i've got another rule if game.destroy = true:
After 5 seconds change game.destroy = false
Spawn actor destroyable_actor
Destroy self
It works, but i have got problem with player position. When platform change alpha to 0 and is not collidable with player, platform dissapears, but player still stay in the same possition in the air. If i jump, he fall down and platform will respawn. I hope you can understand me :D. How to fix this?
Thanks. p.s. sorry for my english

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Im guessing you have no gravity or constant down acceleration on. So theres nothing pushing the player down. so once the platforms gone the player just chills there.
  • networnetwor Member Posts: 89
    In actor player i have:
    Accelerate direction: 270 Relative to scene Acceleration:100
    I'm making platform game and I have got working jumping...
  • networnetwor Member Posts: 89
    Any ideas?
  • networnetwor Member Posts: 89
    Thank you so much! You helped me a lot!
  • networnetwor Member Posts: 89
    If I want to put more this platforms to 1 level, I have to create another 2 atributes for each platform?
  • dre38wdre38w Member Posts: 79
    Hello, I'm using this method instead of my old spawn and destroy method. Problem is I have a LOT of Actors to move off screen and all those actors collide with each other. So do I just make the screen twice as wide and pretty much make a behind the scenes copy of the level placing the Actors all piled up?

    .....I think I answered my own question......Unless there is a better way....
  • m456arcusm456arcus Member Posts: 189
    Do the actors have to collide with each other? If they do, could you make a rule to only collide when their x position is more than 0?
  • dre38wdre38w Member Posts: 79
    Yes they must collide. Only when I click them do they disappear.
  • dre38wdre38w Member Posts: 79
    Is it a bad thing to snap them all off screen and pile them all up while still colliding?
  • m456arcusm456arcus Member Posts: 189
    Probably... But try what I said. Make a boolean attribute and set it to true. When you click the actor, change it to false. Then, make a rule that says when the attribute is true, collide.
  • dre38wdre38w Member Posts: 79
    I actually tried that. For some reason it didn't work.
Sign In or Register to comment.