Destroy actor + change size - Bug

HyryttyHyrytty Member Posts: 39
edited November -1 in Working with GS (Mac)
Is this only a bug or am I doing something wrong?

I got this actor that changes size whenever it collides with a wall. And in collision the wall is to be destroyed. So I added a behaviour on the actor to change size when in collision with "wall", and in the wall I added a behaviour to "destroy actor" when in collision with actor. Now when the actor touchs the wall, it grows in size, but the wall wont destroy? It wont disappear.. And my actor keeps growing and growing..

I added a behaviour to the wall to play a sound when in collision with the actor too, that sound wont play, so I'm guessing gamesalad doesn't detect the collision somehow? Does anyone know if this is a bug?

This only happens when I've got the change size property on my actor, when I remove it, everything works fine..

Thanks in advance,

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    not sure .... but I would try to wrap the change size in a timer set for say 0.2 secs and see if the delay allows the other behaviors to kick in ?!?!
  • HyryttyHyrytty Member Posts: 39
    simo103 said:
    not sure .... but I would try to wrap the change size in a timer set for say 0.2 secs and see if the delay allows the other behaviors to kick in ?!?!

    Smart, I'll try that now and see if it works
  • HyryttyHyrytty Member Posts: 39
    Now the wall destroys but the actor wont grow in size. I changed the timer to 0.01 and still wont grow

    And if I change on the time to "for 1 second grow 1" the wall will not destroy and the actor grows, like before..
  • simo103simo103 Member, PRO Posts: 1,331
    another idea:

    1. Create an attribute like WallHit
    2. In Wall actor put when overlap or collides with 'actor' change attribute WallHit to 1, and then destroy actor (wall)

    3. in other Actor put when attribute WallHit =1 the add your grow part and your sound

    It looks like there might be an issue with the growth of you actor in an overlap position .. perhaps that growth moves its overlap or collide away from the wall. And when you added the timer perhaps the wall was destoryed and therefore doesn't overlap with the actor anymore thus the growth and sound was not triggering.
  • HyryttyHyrytty Member Posts: 39
    It worked now :) Thanks!
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    try taking out the change size behavior, and change the size by using change attribute behaviors. That usually does the trickl
Sign In or Register to comment.