Help with collisions

networnetwor Member Posts: 89
edited November -1 in Working with GS (Mac)
Hi, I'm trying to solve this problem for a long time, but with no success....

I have 2 actors called "stone" and "ice".. I need they can access to scene attributes, so I need put them to game and unlock it. If actor "stone" falled on actor "ice" they have to destroy it...
So I do this:

If actor ice collide with actor stone
and stone.position.Y> ice.position then do something....

It works great....

But my problem is if I i put 2 stones to game and one stone is higher than another and actor "ice" collide with "stone" (collide on sides - not higher position of stone)

My rule won't work:
If actor ice collide with actor stone
and stone.position.Y> ice.position then do something....

Because one stone us higher than another... How to solve this? ("stones" are all one prototype, which I drag to scene and then add different behaviours...)

Thanks for help. I hope you can understand my problem ;).

Comments

  • networnetwor Member Posts: 89
    *bump*
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Make other instances of the stone in your library, and name them something like stone1, stone2, etc...and make attributes accordingly. So it would look something like this...

    If actor ice collide with actor stone1
    and stone1.position.Y> ice.position then do something

    if actor ice collide with actor stone2
    and stone2.position.Y> ice.position then do something
  • networnetwor Member Posts: 89
    Yes, thanks...this can work :D
Sign In or Register to comment.