my actor don't trigger the rule when collide?

guillefaceguilleface Member Posts: 1,014
edited January 2012 in Working with GS (Mac)
he guys, i have some box in the middle of the scene, and a ball coming from left side, i have a rule on the ball when overlaps or collides with box to change att self.position to random(1,4) ,then other rules
when self.position=1 change to certain position and so on from 1 to 4. the problem is that sometimes when the ball collides with the box, the box gets destroyed but my ball stays there spinning, why is not changing position? now if i disable the ball to collide with the box, the ball sometimes instead of change to a random position it just keep rolling destroying more box. i just want for the ball to destroy one box and change position.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    the box is probably destroying to quick to fire the rules

    have in the box when it collides with the ball to change the alpha to 0, then have a timer after .5 seconds or somethign run to completion checked, destroy
  • guillefaceguilleface Member Posts: 1,014
    that sounds like a good idea but still sometimes happens the same, another thing does adding many timer can affect other actors?, like when i add more timers to the box some actors where doing thing that not supposed to do, when i deleted the timers on the box everything was good, is there a limit for timer, i do used them a lot.
  • guillefaceguilleface Member Posts: 1,014
    i double check and they all are check. anyways i try your method for spawning using tables.works good but with some problems.i did this.
    when ball collides with box
    change game.spawning point to random(1,tableColCount( game.Table 1 )) and instead of destroying and spawning, in this same rule i add.
    change self position x to tableCellValue( game.Table 1 ,1, game.spawn point )
    self.position y to tableCellValue( game.Table 1 ,2, game.spawn point ) so now i am getting the ball to move to 1 of this 4 position when colliding with box all the time ,but in my final rules
    when game.spawning point =1 or 2 change velocity to 0 degree(scene)
    when game.spawning point =3 or 4 change velocity t 180(scene). but sometimes the ball just don't move. is this even possible with tables?
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    sorry but if i understand what you meant, you are trying to change the ball direction when it hits the box?
    Then you should have the rule inside your ball not the box. So the box can be destroyed safely and your ball will change direction according to your rules inside.
Sign In or Register to comment.