How to make my enemy discover, chase and lose player.
I have been try to find and try the code from google and unity3d.com, but still cannot work, maybe i dun understand. The code i using now is using System.Collections; using System.Collections.Generic;...
View ArticleWhy do the AI get caught on trees?
When I press play, and the AI spawn in. If I was away they get caught on the trees and objects.
View ArticleEnemy not taking damage on collisions.
Hello I need help with Enemy health and collisions. My problem is i have an enemy object with health script attached. The enemy would take damage when it collides with the player. When i test it the...
View ArticleEnemy shaking when following player
Alright! I have a issue with my enemy. Whenever I get withing a "chase" distance(which is in float), it it supposed to follow the player. Which it does. However, when it chases the player, it starts to...
View ArticleHow can I make a script to make enemy wander, chase, and kill player
I'm trying to make a simple script to make an enemy wander randomly, follow the player when the player is within a certain range of it, and kill the player when the two make contact while using it's...
View ArticleEnemy AI keeps chasing player even after the player has left its line of sight.
Hello and thank you for taking the time to read this question. I have a prototype of a basic AI which uses finite state machine to switch from patrolling around way-points to chasing the player when in...
View Articlehoming bullets
so have my enemy looking at player and shooting my prefab bullet but in my game I want my bullet to be an orb that follows the player till it hits them but I cant seem to find a code that works which...
View ArticleEnemy combat help
I'm trying to make a script where the player is pushed backwards and damage is done to them if they are touching the enemy, but I am having problems because the FPSController is kinematic and cannot be...
View ArticleHow to make enemy`s gun shoot directly on player and its allies from some...
I have and 3d model of enemy with gun and its animation I want to make that the enemy`s gun shoot directly on player from further distance at a place. And yes it fire my player`s allies soldier, also...
View ArticleUnity2D: Making a cloned particle system fire once only
I a have this enemy prefab that gets instantiated from a spawn point in my game, on the enemy prefab I have a particle system componet that if the player shoots the enemy more than 2 times the particle...
View ArticleHow do I prevent my player from pushing a jumping enemy off screen?
My code and two pictures are below any help will be greatly appreciated. The enemy in the pictures is the fish. 1 using UnityEngine; 2 using System.Collections; 3 public class EnemyJumper :...
View ArticleEnemy AI Movement Decision Making
Hi, everyone, I'm working on an enemy AI movement system for a Unity platformer game that will allow the enemy to make one of three decisions on a constant basis: idle, move to the right, or move to...
View Articleenemy doesn't follow the player
I'm using a simple enemy ai that makes the enemy follow the player, I am wanting to spawn my enemies one after the other which I have done, but for some reason the enemy only follows the player if both...
View ArticleI can't get a "victim" (can be seen as enemy) to follow the player within a...
I recently started working for an IT company and I need to develop a 2D game that allows people to practice what to do in case of a fire. Now one of the things is the player having to get a victim...
View ArticleHow to create a semi-intelligent trigger system?
Hello. My problem is that I have to be able to create a firing system that detects and attacks the enemy closer and when this enemy dies attack to the one that is behind and also that when an enemy is...
View ArticleWave script not working...
Hello so I just tried to make a wave scrip but I cant figure out why it is not working. I made a class called Wave to hold floats and ints of how many enemies to spawn and how often. The problem is...
View ArticleHow can I spawn enemies while leaving a gap for the player to advance?
I'd like to have a grid that is 5 units wide that generates rows as the player moves forward. I want my player to advance one unit at a time, whether it's forward, backwards, or side to side. I also...
View ArticleRotating enemy object to face the player when moving
Hello i have a small problem. I am trying to write my own Ai logic what I am trying to do is to make the enemy to face the player when he is moving towards him. I have tried using the transform.LookAt...
View ArticleHow To Duplicate Canvas To Follow Player
Recently, I've been trying to get character health and nametag to follow the enemies. This was a success. However, I am having trouble with getting the canvas that holds the health and nametag to be...
View ArticleWhy does my object go so high?
In the Update() of my enemy script, I have it so that the object will Translate up based on speed and time however the first object that is spawned goes beyond the limit I've set at 2.5 while the rest...
View Article