Jump to content


Pathfinding with mp_potential_path_object

  • Please log in to reply
2 replies to this topic

#1 grifinas


    GMC Member

  • GMC Member
  • 57 posts

Posted 04 March 2012 - 07:26 AM

hello, i've been trying to learn the mp_potential_path_object function.
It doesn't work well. I have 3 enemies.
Upon start 1-st one leaves the room, although there are walls in his way he just ignores them.
2-nd one starts making circles in the air making collision with wall aswell. Eventualy he gets stuck inside a wall.
The last one starts making infinity sighn in the air.

So yeah, they seem quite random.
Here's my code
aaa //compleatly blank path for overwriting
//Name: enemy

//create event


set path aaa speed 3 // this is done with drag n drop, not sure how to write it in code

I would apreciate NOT suggesting me tutorials, cause i never understand those.
  • 0

#2 greep


    Menaces with Spikes

  • GMC Member
  • 2398 posts
  • Version:GM7

Posted 05 March 2012 - 12:01 AM

Heya. Unless you absolutely need the processing power (you have dozens of enemies) I'd just use mp_potential_step. I can't even remember the last time I've seen someone even use mp_potential_path heh. Also, keep in mind, if you have a complex maze, you need to use mp_grid, as the others aren't strong enough.

However, if you insist on the path way, we need more info. Is this in the create event? If in create, are the walls created in the correct order? (All the walls NEED to be created before the object is or it will not make a correct path).
  • 0

#3 roysten


    GMC Member

  • New Member
  • 2 posts

Posted 23 July 2012 - 10:26 PM

I'm also having mp_potential_path problems.

I call the function in the create event and then set my instances to follow the path that's generated. This works.

My problem is that when I try to change the settings using mp_potential_settings the game doesn't start, my CPU reads 100% as if it's working on it. However when I plug in the default variables for the function it also fails to load making me think that this is a bug rather than an error I'm making, could be wrong of course.

Anyone had this issue before?

mp_potential_step won't really work in my case as the room is a maze strictly speaking and the number of instances makes a grid probably not the best approach.
  • 0