Tank not moving towards player
HI, I'm pretty new to Unity and have just started trying to use NavMeshAgent. i'm trying to make my enemy (A tank) move towards the player, but at the moment it kinda just sits then until it is hit and...
View ArticleHow do I make it so that a walking animation plays for the enemy AT THE SAME...
I have been stuck on this for a while. I have it so that "isKinematic" starts out as true for the enemy's rigidbodies until (you shoot its colliders and) it dies as a ragdoll. When it dies,...
View ArticleHow do I make it so that a walking animation plays for the enemy AT THE SAME...
I have been stuck on this for a while. I have it so that "isKinematic" starts out as true for the enemy's rigidbodies until (you shoot its colliders and) it dies as a ragdoll. When it dies,...
View ArticleHelp fixing AI?
So my AI works pretty well right now, but there are things I want it to do that wont work with the code I have later on. Im am currently moving it towards the player using transform.translate, but I...
View Articlehow to destroy all gameobjects with a certain tag?
Hello all. In my scene there is a timer that counts down from 60 seconds. (not a coroutine just a visible timer). When it reaches "0", I want a function to get all the gameobjects that are in the scene...
View Articlehow to kill an emeny?
I want to kill an enemy with a certain number of shots and to give a score afterwards. I have 2 scripts: KillMegaloth - kills in 1 shot - gives correct score public GameObject objectToDestroy; public...
View ArticleEnemy not giving damage
I have an enemy that breaths fire and I had a NullReferenceException. I added ; if(EnemyHealthManager != null) to deal with it and while the enemy does breath fire, it does not give damage What could...
View ArticleThe problem of Enemy scale when he follow the player (script) . How to fix?
Hello , First , let's be clear ... I have a problem and I have somethings i need to get them done . let's start give Details , i use Unity 5.6.3p2 Personal on Windows 8.1 pro 32 bit (i cannot upgrade...
View ArticleCanduct and movement of an enemy
Hi, I have a problem, and I would like you to give me some ideas that could help me to focus on the problem. The problem is: I have something similar to a dungeon, and in that dungeon there is a hidden...
View ArticleUnity 2D Platformer Enemy follow Player on X-axis only, c#
Hey guys, I am making a battle system for my RPG game, and I've run into a problem. I want it so if the enemy chases the player non-stop *only* on the x-axis. Then, when the enemy gets to a certain...
View ArticleHow can i add simple back and forth movement on the Y-axis to an enemy that...
Hello, I m creating a 2D horizontal side-scroller shooter and I have enemies being spawned, whose rigidbody component is being used to give them a velocity like so: public class Mover : MonoBehaviour {...
View ArticleHow to make an enemy attack every few seconds
I was wondering how to make an enemy attack, and make it do so every few seconds. (using c#)
View Articleplatform ai following player direction when close, flips normal movement...
so i have a enemy that moves left and right and when he gets in attack range he looks left or right depending where the player is. it works fine but then when he moves back into his normal patrol, his...
View Article[Solved]Chaining projectiles
Hi, I'm attempting to create a chaining effect for my projectile. The idea is that I want to shoot a projectile and when said projectile hits an enemy, I want it to find the closest enemy to the enemy...
View ArticleEnemy raycast detection
I'm making an enemy AI and would like it to do this: Wander around untill the raycast detects no objects in between it and the player Chase the player until an object is between them then resume...
View Article"SetDestination" can only be called on an active agent that has been placed...
So I'm making a 3d fps game. I was using @Brackeys tutorial - https://www.youtube.com/watch?v=xppompv1DBg just to add enemy. I checked my script 2 times, It's the same as in the video, i did all things...
View ArticleEnemy AI ignores the distance from the player
Hi, I'm making a 2D platform and I'd like the enemy to follow the player only within a fixed range. When using this script tho it follow the player regardless of the distance. Could you help me out?...
View ArticleEnemy keeps moving in one direction. Help pls!
Hey, i created a script for an enemy ai and it works... A little bit... It makes the enemy moving in random directions and change them after a short time. The problem is that it does this once and then...
View ArticleMissingReferenceException: The object of type 'EnemyController' has been...
I have an enemy that I've duplicated as I want more than one of the same type of enemy. However, once I kill one of the enemies and then take damage from the other enemy, the game crashes. It's like...
View ArticleCan't change direction when enemy collides with obstacle
I'm having trouble getting my enemy game object to change direction when it collides with an obstacle. I have it set up to move randomly, and will change direction after a certain amount of time has...
View Article