Enemy AI Lagging
I am making a top-down shooter for mobile whenever a porcupine enemy shoots a bullet the game's fps drops very low and the game pauses I need to know how to fix this issue it doesn't happen with my...
View ArticleHow to update your position your every frame
So basically I am trying to get my enemies to follow me, but they go at my starting position, I have tried many things, watching videos, Unity course, but I can't seem to figure out anything. ![alt...
View ArticleDestroy a spawning enemy prefab with an weapon prefab
I have three prefabs which I instantiate with a spawning script. This is the code for it: public class SpawnManager : MonoBehaviour { public GameObject[] enemyPrefabs; private float spawnRangeX = 7f;...
View ArticleEnemy AI following player help
I created a basic AI that follows the player around the map, however since my map is basically a maze with rooms added in, what can I do to prevent it from being stuck in a room, trying to get to my...
View ArticleStationary Enemies from Tilemap
I want to have turret-like stationary enemies in my 2D platformer that fires in intervals in the direction they're facing (static). Ideally I want to place these around the map with a tilemap, but how...
View ArticleHow do i make a bot turn,How to i make my Ai turn around
Hello i am making my first 2d game and i have a player and a enemy. I have the movement for the enemy but how do i make so when he switch direction the character truns around? Here is the script in c#...
View ArticleInstantiate Bullet that points to the player
I'm new to unity and wrote this enemy AI script from a tutorial. Whenever I spawn in the bullet, it is always rotates towards (0, 0, 0) and the bullet ends up facing upwards. I would like to change it...
View ArticleDifferent enemy types script design
So I have 2 different enemy types for now. Both of them with EnemyAi, Health scripts tied to parent and EnemyAttack script tied to child damage zone trigger. Currently the enemies are all melee and...
View Articlehow do I make smart checkpoints?
I have made checkpoints in unity and they work ok (they respawn the character when the character dies) but all the enemies that my character has killed so far has respawned with the character. How do I...
View ArticleA warning before a enemy spawns
Hello, I have randomly spawnend circles and I want that before they are spawned that there is a warning or something like that at the same position as the circle using System.Collections; using...
View ArticleI need Help spawning game objects (enemys) from the top of my screen,How can...
Hello, I'm programming a Spaceshooter game and I'm basically done but the only problem is that my gameobject (Asteroids) are not spawning randomly , they are spawning just in one line and i want them...
View ArticleHi, im trying to make some simple 2d enemy path but somehow its not working...
so if i play game enemy is going where it should go but not doing next thing i mean going to "path2" using System.Collections; using System.Collections.Generic; using System.Diagnostics.Contracts;...
View ArticleEnemy not following player, navmeshagent AI
Hello, I am having a bit of a problem. It's not huge I guess as I could just put the player into the scene and everything works fine. However, I would like the player to be able to spawn in. The...
View ArticleHow to Reuse Script on Enemies - Please Help!
Hello, I'm working on making a system where I use a scriptable object to store all the info that's unique to each enemy in my game. I want to make one reusable script that does everything every enemy...
View ArticleHow do I make the enemy lock onto the player's x-axis coordinates?
Currently I have the enemy fully locked on the player, but I'm trying to make the enemy character move towards the player's x-axis coordinates while forever moving down the y-axis. using...
View ArticleOnCollision2DEnter Help?
Can anyone help me out. i would like to know the best was to alter the following script so that it only apply to one of my enemies instead of both. I'm trying to keep all the enemy stats, health,...
View ArticleHow to connect generated points on a sphere?
I want to implement a A* algorithm in my game, which takes place on a planet. I generated evenly distributed points with the Code below and my wish is to create connections between a point and about...
View ArticleNavMeshAgent not working, working for some agents
I have an enemy spawner, spawns enemy prefabs. All those enemy prefabs have the same enemy movement scripts, different agents. The small, fast enemy does now move however. The script is public class...
View ArticleStackOverflowException: The requested operation caused a stack overflow....
I was trying to make a dismemberment of my enemy when my sword collides with him. This script is in all the parts that i want to dismember. This is the erro: StackOverflowException: The requested...
View ArticleShow Enemy Name On UI Canvas?
Heyho! I am currently working on a 2D game and I try to make the health of the enemy appear on the UI rather than on top of the head of the enemy. I also want to make a public variable, that stores a...
View Article