Even though I don't use game maker to build my game right now. Your tutorials are really helpful to me since you explained all those math concepts behind the code. I've seen a lot of tutorials which don't bother to explain.
This is great! My only suggestion would be to consider gathering these all into a playlist, because I found this video and started working through it before I found the first video on Vectors.
How would I go about making my enemies pursue the player and avoid solid objects for example walls? I want them to be able to navigate around walls to find the player almost like A* pathfinding but this is more fluid. I'm also keeping separate collision codes so if the enemy collides with a solid object, its state changes bounce away from the wall, and then resets to the pursuing state. I tried messing around with the full project by editing the room and adding a wall tile but the ship seems to flee from it indefinitely. I also noticed I had to give the solid objects the initial creation event variables for the ships to identify them as part of the same vectors. I believe that the solution is to lower the flee range of solid objects for the enemies but I'm not sure how. Can anyone please help?
I have copied the code, almost verbatim, I just changed mouse.x and mouse.y to player.x and player.y but I keep receiving this error : ERROR in action number 1 of Step Event0 for object Vector02: Unable to find any instance for object index '-9' name '' at gml_Script_anon_vector_gml_GlobalScript_vector_561_vector_gml_GlobalScript_vector II dont know if anyone else is getting this error but I have no idea what '-9' is and have never created object named '-9'. Anyone have a clue to what my issue is?
I had an unusual crash pop up later on while using this on a target that can 'die': if instance_exists(o_player){ seek_force.add(seek force(my_playerX, my_playerY)); } It would still crash when the player died since the players location no longer exists during seek_force.add during the same frame I guess. To get around it (for now at least) I had to reverse the check with another check inside. (!instance_exists(o_player)){ steering_forces.set(0, 0);} else { if object_exists(o_player2) { steering_forces.add(seek_force(my_playerX, my_playerY )); } } Not exactly the same but, maybe this will help someone.
You sir have such an underrated channel. Thank you for this video, it's exactly what I needed!
This is unbelievably good and instructive. Full of knowledge and yet simple and clear tutorial. Thank you!
Even though I don't use game maker to build my game right now. Your tutorials are really helpful to me since you explained all those math concepts behind the code. I've seen a lot of tutorials which don't bother to explain.
Brilliant. Very easy to understand explanations. Can't wait for the next one.
exactly what i need for my project at the moment. i'm looking forward to play with what i just learned in gms. thank you very much!!!
This is great! My only suggestion would be to consider gathering these all into a playlist, because I found this video and started working through it before I found the first video on Vectors.
Fantastic video. Such amazing content Mr Spade!!! Thank you so much.
thanks for this i am making my space game and this helps!
I'm enter to the GameJam for GXC, i want to make a enemy with good attack patterns, thank for the video
Thank you again!😀x2
Hey dude! Great video, I'm just wondering what you use to do your animations? Thanks.
How would I go about making my enemies pursue the player and avoid solid objects for example walls? I want them to be able to navigate around walls to find the player almost like A* pathfinding but this is more fluid. I'm also keeping separate collision codes so if the enemy collides with a solid object, its state changes bounce away from the wall, and then resets to the pursuing state.
I tried messing around with the full project by editing the room and adding a wall tile but the ship seems to flee from it indefinitely. I also noticed I had to give the solid objects the initial creation event variables for the ships to identify them as part of the same vectors.
I believe that the solution is to lower the flee range of solid objects for the enemies but I'm not sure how. Can anyone please help?
I have copied the code, almost verbatim, I just changed mouse.x and mouse.y to player.x and player.y but I keep receiving this error :
ERROR in
action number 1
of Step Event0
for object Vector02:
Unable to find any instance for object index '-9' name ''
at gml_Script_anon_vector_gml_GlobalScript_vector_561_vector_gml_GlobalScript_vector
II dont know if anyone else is getting this error but I have no idea what '-9' is and have never created object named '-9'. Anyone have a clue to what my issue is?
What is solid parent
But how to steer away from obstacles
Or
How to avoid collision
For some reason my seeker gets turned invisible even though i copied everything exactly?
I had an unusual crash pop up later on while using this on a target that can 'die':
if instance_exists(o_player){
seek_force.add(seek force(my_playerX, my_playerY));
}
It would still crash when the player died since the players location no longer exists during seek_force.add during the same frame I guess.
To get around it (for now at least) I had to reverse the check with another check inside.
(!instance_exists(o_player)){ steering_forces.set(0, 0);} else {
if object_exists(o_player2) {
steering_forces.add(seek_force(my_playerX, my_playerY ));
}
}
Not exactly the same but, maybe this will help someone.