So I have bean trying to create a selecting & collision system, and I already have the selecting system done but the pathfinding not so much. I have already looked at examples, wiki ,and have done step by step instruction yet it dosent function at all.Being that the object(Oval) dosent move. Hear are some pictures of my events and how it looks any help at all?(I do have the physics automatism implemented to all objects in scene)
It would be helpful if you could post up your GD file rather than these pictures.
Oh didn’t know you could do that…
Work Space.rar (6.92 KB)
There you go any help now?
P.S. Sorry for the late response.
It would be better in a zip with all the pictures.
I took a look at your project:
I found your Oval object has two incompatible automatism, pathfinding and physics… you don’t need the physics automatism, so I remove it and the Oval object began to move.
However the Oval object was moving to wrong places.
I had never found the exact reason why the Oval object was moving to wrong places BUT I saw your project was a little desorganized, so I organized it:
- Along your project, you were evaluating at least 3 different times if the cursor performs a left-click. That’s absolutely unnecesary, so I organize all the differents actions you perform for this condition under just one evaluation of this condition.
- Some variables and game-window settings were unnecesary constantly performed, so I moved them under a “At the scene start” condition.
Once I made this changes the Oval object “magically” begans to move to the right place. I made other changes to keep it running more efficiently:
- The Oval position wasn’t displayed at screen because you were calling for non existent object variables, so I fixed this calling the PointX() and PointY() functions of the Oval object.
- Set the grid size of the pathfinding automatism to width=32, height=32. This way it matches the minimun size of the obstacles.
- Downsize the collision mask of the Oval object a little.
I made this model of a simple pathfinding project with external events (as your original project have), in some way it’s still your project but with all the fixes and without all unnecesary events, objects, pictures and automatism:
simple_pathfinding_with_external_events.zip (5.02 KB)
Hope it helps
Erdo, thanks for the help I see what I did wrong now I can start on other stuff