Help With 'step Towards Point'
#1
Posted 28 February 2010 - 03:42 PM
#2
Posted 28 February 2010 - 04:03 PM
#3
Posted 28 February 2010 - 04:13 PM
That is the GML equivelent of the function I used...so it doesnt work.I'm not sure about D&D having not used it in years. But you should look into the mp_potential_step function in the manual. It can be used to do actually what you want.
#4
Posted 28 February 2010 - 04:20 PM
#5
Posted 28 February 2010 - 04:33 PM
perform a step towards position (NPC.x,NPC.y) with speed 5.1 avoiding solid onlyinto GML?
PS. The walls are definately solid.
#6
Posted 28 February 2010 - 04:42 PM
mp_potential_step(NPC.x,NPC.y,5.1,false)//This is the function with the arguments you need.Change false to true if you want to avoid non-solids as well.
#7
Posted 28 February 2010 - 04:55 PM
I inserted that code replacing the D&D and it did the same exact thing, it wasn't avoiding it, it was going towards its target until it hit a solid, then it went along the solid, always touching it until it could get around. But that is far from AVOIDING solids.mp_potential_step(x,y,stepsize,checkall) // This is the function in its basic form
mp_potential_step(NPC.x,NPC.y,5.1,false)//This is the function with the arguments you need.Change false to true if you want to avoid non-solids as well.
#8
Posted 06 March 2011 - 11:24 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











