Player target enemies automatically
Hi I have this Script. I have 3 enemies but if 2 of them attack me I only can attack 1 of them at a time. I want not to target only one, but target any enemy who reach me without pressing a button....
View ArticleEnemy 2d attacking
Ok so i just made an enemy, But with this script the enemy basically just jump on me one time, then go back to the patrol points i set for it then never go on me again. I need help to make the enemy...
View ArticleEnemy's set position is incorrect?
Basically, the enemy has two specified points in which it moves until it has reached one point, and then when it reaches the 2nd specified point, it repeats. Here's the problem though... ![alt text][1]...
View ArticleChange music when spotted by Enemy Unity 5.0
Hey, I was trying a way to change the music of the game when the enemy sees the player or when he get hurt. Once dead or enemy lose you returns to the original music. It works well, my problem arises...
View ArticleCan anyone help with me with my attack script and enemy script?
When I attack I'm not sure why the enemy is not taking damage, my enemy script works i believe as when I set its health to 0 the enemy is deleted. this is the script i believe has problems with it....
View ArticleI'm finding closest with GameObject.FindGameObjectsWithTag("Enemy"). How can...
I'm finding closest with GameObject.FindGameObjectsWithTag("Enemy"). How can I use this code (or anything else) to find nearest enemy game object in multiplayer (unet)? I am actually making an rts...
View ArticleInfinite instantiation w/ for loop? Please help!
for(int i = 0; i < enemiesInWave; i++) { Instantiate(zombieObject, ZombieSpawn().transform.position, ZombieSpawn().gameObject.transform.rotation); print(i + " " + enemiesInWave); } why does it...
View ArticleEnemy Chase, transform, rotation Problem
So I have this problem it started to occur once I added in a model from blender which normally has the x rotation value at -90 degrees at standard and even when I change that in Unity and Blender...
View ArticleC# - 2d --I have two questions... both seem like they should be incredibly...
I'm trying to solve two problems I can't figure out. First - with the following code I create a delay - so the enemy waits a tick after spawning before shooting. Problem 1 -- This delay works - but -...
View ArticleNavmesh follow and stop at a distance
Hi so what im trying to create is. the play can right click on an enemy and he will follow at a certain distance. which is working fine. but what i want it to also do is stop at that distance too....
View ArticleScreen clear using tags
I am trying to create a screen clear for my enemies but for the ones in the camera's view. The main issue is that all the solutions give me a half way result. My button Code void ScreenClear() {...
View ArticleDamage enemy cooldown
Hey, I have a script on my weapon that calls a Damage function on the enemy OnTriggerStay2D. The weapon has a cooldown so that the enemy only gets hit as often as the cooldown. The problem is that the...
View ArticleMoving an Enemy randomly
Well, my game is a 2D game, the concept is when the enemies touches the player the game is over. But my problem is I can't make the enemies move on their own at random and when they hit the wall they...
View ArticleShooting and damage with raycast doesnt work.
so i looked at quite a lot of tutorials and other posts regarding raycast shooting and damage but i still cant get it to work.I don't get any errors but it still doesn't work! here is my script for my...
View ArticleSurvival Shooter Tutorial: Why Isn't the Score Increasing When I Shoot an...
I'm working on the Survival Shooter Tutorial. Somehow, when I shoot down an enemy, the score does not increase. It instead stays the same. I kept looking back at the tutorial, but still did not find...
View ArticleEnemy Health Won't go Down
I'm following a tutorial on youtube (https://www.youtube.com/watch?v=Q_o74dbn3ZU&list=PLZ1b66Z1KFKik2g8D4wrmYj4yein4rCk8&index=11). They are using unity 5 and I'm using unity 5.6. Our scripts...
View ArticleHelp with AI enemies
Hello! I just need help with AI. I have no clue how to make them. All I need is a stationary prefab that shoots another bullet prefab every say 2 seconds. If someone could help me that would be...
View ArticleHow do i make the enemy go away from multiple enemies.
I can do it with one player but not two or more.
View ArticleHow do I stop a child from taking the parent's tag?
I have an object attached to the player that is 2.4 units ahead of him, and only appears while he is running. The player's tag is 'Player', while the object's tag is 'Melee'. I have a script that tells...
View ArticleHow to make enemies flash on hit
I want the enemy to become red for something like half a second when hit. I altready searched on Unity Answers but i didn't really understand...
View Article