• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM *SOLVED*mp_potiential_step cancel

Didjargo

Member
Is there an efficient way to make an object give up attempting an mp_potential_step command if it is impossible for them to reach their destination?
 
J

jackhigh24

Guest
in one of my game i stop mp potential step if im close to what i aiming to get to, so that might work for you depending on if the path is always going to be clear once your close enough.
 

Didjargo

Member
in one of my game i stop mp potential step if im close to what i aiming to get to, so that might work for you depending on if the path is always going to be clear once your close enough.
My issue that prompted this thread is that I am making an RPG game with turn-based battles. Only instead of combatants remaining in static locations, they move around the battlefield (not grid-based). Through testing, I have found a game breaking bug where if the player surrounds an emeny unit on all sides, giving it no room to move, then when that enemy takes its turn it cannot move to a new location and thus just runs in place perpetually. Since it is turn-based, this breaks the game as nothing else can happen until that object reaches its destination.

I've thought of a crude solution though that might work, though I haven't tried implementing it yet. potentially, I could have the enemy unit release a sort of "recon" object before it starts to move. This recon object will have the same mask as the enemy and move towards the same destination only slightly faster. If the enemy object catches up to the recon object before reaching the destination, the movement is canceled. Do you think this could work?


EDIT: I decided to try out my recon object idea, and it worked.
 
Last edited:
Top