Enemy prefab with NavMeshAgent change speed in other map?
Hello everyone! I have an enemy Prefab with the classic script inside to make it chase the Player when it is at some distance. I used this prefab (in a multiple way, at least 5 enemies per map) on 6...
View ArticleHow to get in enemy to stop after a certain distance from the player?
I can get the enemy to attack and chase but I want to be able to stop the enemy after the player gets a certain distance away from the enemy. I'm new to coding so if it looks like a spaghetti mess I'm...
View ArticleHow to get the enemy jumping all around?
I got the enemy to chase me, but halfway he jumps to the other side of the area or stays on the outside of the walkable area. New to coding so I'm not sure if its in the code or the NavmeshArea. using...
View ArticleOnCollisionEnter isn't working
I have a collider on both the bullet and the Enemy Object and a rigidbody on the enemy and it still doesn't work. My bullets just go through the enemy. Here is my code. using System.Collections; using...
View Articlecan't detect what player collides with, tried everything and all other posts...
so i want to make a 2d game where when player collides with spike it triggers something (for now i want debug.log to trigger just to be sure) void OnCollisionEnter2D(Collision2D trig) { if...
View ArticleI need help with Enemy following my Player
Hello everyone, this is kind of a specific question, so will try to clarify as much as I can. I have a 2D top shooter game, where I instantiate Enemies from different points and they follow my Player...
View ArticleRotate when the objekt reaches a Point
Hey! I just started Programming with C#. The script makes an Objekt go from PointA to PointB and back. I just wanted that the Objekt rotates 180 degrees whenever the Objekt reaches pointA or PointB....
View ArticleHow do I make a enemy follow me
I am making a fps shooter and I need my enemy to follow me when I am with in a certain range of the enemy this is what I have so far.` using System.Collections; using System.Collections.Generic; using...
View ArticleHow to fix pause menu problem?
Hello, I am having a problem with my C# pause menu script. What happens is when "escape" is pressed to open the menu it's fine and when you press it to close it close fine also. But the problem is when...
View Articleenemy AI patrol not working
I made this code for my enemy but it just flickers side to side, anyone know what i could do ? using System.Collections; using System.Collections.Generic; using UnityEngine; public class MonsterAi :...
View Articlemake something move when not looking at it
I cant find a way to do this. I want my enemy to move when it is not looking at it. i have this. it kinda works. if you don't look at it. It wont move. If you look at it it wont move. You have to be...
View ArticleEnemies sharing health
I am creating an fps and am up to creating enemies, at the moment i have two for testing. i created a script for the enemy and its health and a shooting script for the player. however all the enemies...
View ArticleHow to fix enemy's rotation (2D)
So I have a script assigned to my enemy for it to follow my player and the problem is it keeps rotating on the y axis, How can i fix this, Here's the script: public Transform Player; int MoveSpeed = 4;...
View ArticleBullets not destroying enemies
I'm going crazy, I have enemies flying along waypoints named and tagged as "Enemy" (i've tried by name and tag) my bullet code can knock them but doesn't destroy them. Bullet code is the following:...
View ArticleLogic of a flying enemy?
I wanted to make a flying enemy in my game. If you look at some flying enemies in dead cells, they usually move in a curve, but sometime they move kind of straight to you. I saw this in other the games...
View ArticleSet rotation of enemies coming from spawners
I have several spawners placed around a central point. I'd like the enemies from the spawners to be rotated so that they are facing the central point. Is there a way to set it so that each enemy picks...
View Article2d explosion damage
Hi, i am trying to make a grenade that explodes and gives damages to the Enemys. Spent hours trying but got nowhere The explosion funcation void Explode() { Collider[] colliders =...
View Articlei have problem with player attacks enemy
i made player attacks enemy with box collider and now I want to make the box collider appear when player starts attacking and box collider to disappear when he stops attacking is there some way to fix...
View ArticleEnemies keep gathering and stumble upon each other
I'm making a 3D zombie game using AITherdPersonController from the standard Unity Asset. The problem is that when zombies chase after the player, especially when the latter runs around them, it looks...
View ArticleEnemy spawning problem...
So I am building a wave spawner using Brackeys' code. However for some reason his script is not being detected. The error message is > The associated script cannot be loaded. Please fix any compile...
View Article