Nice! Just making me realize how simple and cool a lot of this stuff can be. It reminds me a lot of an old XBOX LIVE Arcade game from the 360 called "i maed a gam3 w1th z0mb1es 1n it" with how similar the AI movement mechanics function. Still has one of the best OSTs to this day in my eyes... 😌 lol keep it up!
as soon as i click play my console keeps saying Object reference not set to an instance of an object. and then the file name. Can you please help since i am a starter and dont understand this???
Have the exact same problem the error says. “NullReferenceExceptiom: Object reference not set to an instance of an object EnemyFollow.Start() (at Assets/EnemyFollow.cs:13)
Wow that was simple, i subscribe!!, Can you make other tutorial like how to make a jumpscare menu when the enemy got you, because i was making a horror 2D game
I have a question how can you make it so that if an object is in front of it, like a wall, cannot follow the player anymore and just goes somewhere random
yeah! add 2D box colliders to the walls, then a 2D collider to the enemy and give it a 2D rigidbody (make sure to set the gravity scale to 0 so its not effected by gravity). that should do the trick
I appreciate that, unfortunately when I had my patreon set up I didn’t really have the time to put into it so I shut it down, hopefully I’ll be able to work towards trying again soon!
I appreciate that, unfortunately when I had my patreon set up I didn’t really have the time to put into it so I shut it down, hopefully I’ll be able to work towards trying again soon!
@@JakeMakesGames Hey quick Question: How would I modify this script to make the enemy rotate to face me as he chases. Right now he just chases but wont face me. using System.Collections; using System.Collections.Generic; using UnityEngine; public class Enemyfollow : MonoBehaviour { public float speed = 1.0f; public Transform target; // Update is called once per frame void Update() { transform.position = Vector3.MoveTowards(transform.position, target.position, speed * Time.deltaTime);
Time.deltaTime pretty much stores time between the last frame to the current one, and ensures that everything runs the exact same on every machine, even if they have different FPS and refresh rate capabilities
Nice! Just making me realize how simple and cool a lot of this stuff can be. It reminds me a lot of an old XBOX LIVE Arcade game from the 360 called "i maed a gam3 w1th z0mb1es 1n it" with how similar the AI movement mechanics function. Still has one of the best OSTs to this day in my eyes... 😌 lol keep it up!
Simple and effective is the way to go until you need to make it more complex for sure! Haha thanks man!
Woooo, perfect.
👍
Glad you enjoyed!
Amazing Tutorial as always. If it wouldn't trouble you too much, I'd love to see you do a player melee and/or ranged attack tutorial.
Can do! What sorta shooting would you like to see? Top down shooter, or platformer shooter?
@@JakeMakesGames I'd like to see a top-down shooter.
@@JakeMakesGames Top Down!!
i did the tutorial but the enemy just flies away when i bump into it and stops following me
any tips?
If your player/ enemies have rigidbodys and colliders ensure that the colliders are triggers as it may be the rigidbodys are clashing
@@JakeMakesGames wow i didn't even think of that
thanks I'll try it out
No worries!
Can you make a platformer level editor guide and saving the levels
If you can maybe even cloud saving
Probably not, sorry
Can you make a 2D movement tutorial? I want my game to have some sort of momentum or sense of realistic speed like in Mario or Sonic
I’ll have a play around in unity and see what I can come up with
as soon as i click play my console keeps saying Object reference not set to an instance of an object. and then the file name. Can you please help since i am a starter and dont understand this???
im going to need more details? what object reference is not set?
Have the exact same problem the error says.
“NullReferenceExceptiom: Object reference not set to an instance of an object
EnemyFollow.Start() (at Assets/EnemyFollow.cs:13)
@@superspud678 sounds like the issue is coming from your start method, what code do you have there?
@@JakeMakesGames target = GameObject.FindGameObjectWithTag("Player").GetComponent();
@@superspud678 make sure the player has the "Player" tag assigned to it
Wow that was simple, i subscribe!!, Can you make other tutorial like how to make a jumpscare menu when the enemy got you, because i was making a horror 2D game
All you did to do, is when the player collided with the enemy set a canvas game object to true :)
Can you do a tutorial on how to make a player shoot in a top down shooter
Sure!
I have a question how can you make it so that if an object is in front of it, like a wall, cannot follow the player anymore and just goes somewhere random
You’ll probably need to use raycasting to detect when there’s a wall in the way and change the enemy behaviour depending on that
Okay
Hey also do you have any tips on how to make it if you are to far away it will stop following you
is there any way i can add wall collision to the enemies when i just add a collider the fly through the wall and the wall have colliders
yeah! add 2D box colliders to the walls, then a 2D collider to the enemy and give it a 2D rigidbody (make sure to set the gravity scale to 0 so its not effected by gravity). that should do the trick
Thank you@@JakeMakesGames
Tried to support you on patreon but it says your account isnt set up for that
I appreciate that, unfortunately when I had my patreon set up I didn’t really have the time to put into it so I shut it down, hopefully I’ll be able to work towards trying again soon!
I appreciate that, unfortunately when I had my patreon set up I didn’t really have the time to put into it so I shut it down, hopefully I’ll be able to work towards trying again soon!
@@JakeMakesGames Hey quick Question: How would I modify this script to make the enemy rotate to face me as he chases. Right now he just chases but wont face me.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Enemyfollow : MonoBehaviour
{
public float speed = 1.0f;
public Transform target;
// Update is called once per frame
void Update()
{
transform.position = Vector3.MoveTowards(transform.position, target.position, speed * Time.deltaTime);
}
}
Can you do a top down shooting one pls
I was thinking about doing a top down shooter series!
@@JakeMakesGames cool
Out of curiosity, is Time.deltaTime put to make sure the AI is not always fixed on the player's position?
Time.deltaTime pretty much stores time between the last frame to the current one, and ensures that everything runs the exact same on every machine, even if they have different FPS and refresh rate capabilities
Now make Inventory System in 1 minute
Wouldn’t mind making a tutorial on an inventory system but I doubt it’s doable in 1 minute 🥴