Collide with everything in game?

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
edited August 2012 in Working with GS (Mac)
Hey guys,

I am a bit stucked right now. I have many actors that get their position randomly. So, to avoid collisions I set up a
overlap rule.

When overl. or collides - with actor of tag - everything in game
Every 0sec. replace.

But somehow sometimes they are overlapping?! :/
Thx

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    If you have the actors movable you can just use a collide with actor with tag and they shouldn't overlap.

    Darren.
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Thx for the quick reply. Yes, but I have 7-8 different actors in the game, so this would be a rule with much conditions. Of sure with "Any".

    But why doesn't my method work? All actors are movable!
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Maybe I should explain it better.

    I have 8 different actors in the scene. Their position is chosen randomly. The attribute "startGame" is set to true after 0.5 sec.
    Now the rule of the actors:

    When "startGame" is false
    change self pos. X,Y to random

    when overlaps with everything in game
    timer every 0.sec run to completion
    change self pos.X,Y to random

    Somehow it doesn't work and some actors overlap....

    thx :)
  • UtopianGamesUtopianGames Member Posts: 5,692
    See the file i uploaded, it might help?

    Darren.
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    edited August 2012
    thx :) just one thing, I never worked with tags before. How can I create a tag like in the file one "collide".

    :)
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    thx :) have a great weekend!
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Hey @UtopianGames

    I did it like in your project. But sometimes they still collide and the self attribute "Overlapping" displays false, but they definitely overlap. I created a tag and moved in all the actors that are affected. Do you have an idea why this happens?

    thank you!
  • UtopianGamesUtopianGames Member Posts: 5,692
    Not really sure without looking at the project.

    Could it be the timers are set to after or for instead of every?

    Darren.
Sign In or Register to comment.