Multi-Resolution Game Development With GameBuilder Studio Check it out!
NEW Version 0.9.7 has arrived! New Blazing Fast Particle Engine & More Game Actions. Check it out
Collision gets cached
  • Hi Lavon,
    I had this issue in an earlier build, but it was fixed back then (middle 2014ish). The problem seems to be back now. I attached a sample project where one "hunter"-entity is supposed to find a "prey"-entity in range on mouseclick. The entity found will stop moving and the hunter will aproach. On collision of their spatials the hunter will reset his position and the prey will disapear.
    If, while doing so, the hunter collides with a "prey"-object not stopped, this collision gets cached. Should this very object be picked next by the hunter, it will disapear instantly without a collision happening at the moment.
    https://dl.dropboxusercontent.com/u/48190256/findtest.zip
  • 1 Comment sorted by
  • @Cavaron the issue here is the order of your conditions on the Prey entity. On the Logic_death component you are checking for the value of the "caught' property first which evaluates to false which causes the Rule map to exit. So it doesn't even get to the Collision Event condition that has already captured the collision event and internally set a collision true flag which doesn't get cleared until it gets evaluated. So the next time the Rule Map runs and the first condition is true and it gets to the collision condition that internal flag is still true and hasn't been reset yet because it hasn't been evaluated yet. The way the Rule Map works is it checks each condition one by one in order and the minute one condition fails it exits execution and doesn't check the rest of the conditions. If you change the order to have the Collision event occur first that would fix this.

    i guess you could consider this a bug but that is really how it was designed. I will see how we can improve this without sacrificing performance.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Tagged