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
Aborting a Find Path or Move Along Path action
  • I've found that attempting to "Destroy" an entity while using path finding or following functions will cause errors that freeze the game. I've determined that the crashes don't happen when I trigger Destroy on "On End Of Path Reached" so I tried putting that in a Conditional Action checking a custom property "DestroyMe", but I guess the time it takes to check the condition is long enough that the path fining is triggered again and I get a crash when trying to destroy the entity. The Find Path action is on a timer, by the way
    I guess one solution is to check the the property in the conditions for my rules map for the Find Path action but it would be good to be able to be able to call the Destroy at any time so what I'm wondering is...
    Is there a way to abort a Find Path or Move Along Path action so that I can destroy the entity without causing a crash?
  • 2 Comments sorted by
  • If I were to put the "Move Along Path" action in it's own rule map instead of in the "On Path Found" trigger, would the "Move Along Path" action stop when the condition becomes false? (provided "run to completion is checked)
  • Ok, So that worked.
    Incidentally, an awesome feature to add would be the ability to rotate a spatial at a given rate towards the orientation of the beginning of the path before it actually follows the path. As well as some means of smoothing the rotation of the spatial when it orients to a found path. It can be really jittery even when following a straight line

    Also the option of transition rate in the ROTATE TOWARDS action would be nice

Howdy, Stranger!

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

In this Discussion

  • DbD February 26