Trying to make a spawning enemy code
The enemy will spawn in the same spot. When the enemy spawn he wil move down towards the player if the player jumps over the enemy the enemy will keep moveing until he hit the end of the world. Once...
View ArticleDoor open after destroying all the enemies.
Another question here. I have been looking for a solution for something like when i kill the enemies in a level, a door will open or something like that will be triggered. Not much discussion went...
View Article2D enemy to move within level not over it
Hi I am using a basic bit of code to make an enemy I have within a game to follow after the player, however it doesn't move within the level it moves over it not colliding with anything. here is the...
View ArticleEnemy does not look the player 2D platformer.
Hello everyone. I'm trying to write a C # combining various scripts. What I want to do is allow the enemy to look over the player to follow. This does not work now. The player itself is the enemy right...
View ArticleUnity 2d count collisions ontriggerenter?
Hi. I'm trying to write a script for my enemy. When shooting the enemy this script has to count when the bullet enters and leaves the box collider. I want to add a maximum of two shots that just fired...
View ArticleC # script Enemy shoots left 2d platform.
Hello in the title as my enemy fire only left when facing the player. When the player is on the right, the enemy does not shoot. I found the problem in this line of code # 32 --- _direction = new...
View Articleunity 2d C # script follows the enemy player.
hello. I have this script for development in 3D. the enemy follows the player, but it does not work well for a 2d game. How do you change in 2d so that the enemy follows the player, using the x-axis?...
View ArticleEnemy facing player, but ignoring player rotation
I'm making a 3D top down shooter, so I need my enemy to look at the player when he enters in his range. I made a script to get the angle between them, it works fine, but when the player rotate (around...
View ArticleC # script error CS1729.
Error CS1729: The type `UnityEngine.Vector2 'does not contain a constructor That takes` 1' arguments script: using UnityEngine; using System.Collections; public class EnemyInseguePlayer : MonoBehaviour...
View ArticleC # script the enemy chases the player.
Hello everyone. I have this script that does not work for the enemy. When the player approaches the enemy, it is not pursued. The enemy remains still in place. What could be the problem? Script of the...
View ArticleHow to fix lives counter in C#
so with in my project there is an object that lowers the score by ten and the lives by one but every time this collision occurs the score automatically goes to zero please help the entire code is as...
View Articleother enemy takes damage first when i hit other one
other enemy takes damage first when i hit other one until it die and just then the one thet i direct hit starting to take damage i use OnTriggerEnter on my shot script. does some one know why is that...
View ArticlePredict enemy position in X seconds?
Below you can see a method that tries to predict the enemy movement in X seconds, but it's not accurate enough, if you could find any messups in my code I'd really appreciate it! Details: - The enemy...
View ArticleEnemy Chase and Jump : 2D Coroutines
Hi, I am struggling with a simple functionality to let the enemy jump once when it is within range of the player. My enemy (in this case a dog chasing a mouse based on the Jetpack Joyride Tutorial)...
View ArticleMy healtbar is not change when i look another enemy
i have 2 enemy with health 120 and 100 healtbar GUI when the raycast is hit the collider that GUI is true, when the raycast hit enemy 120 the healtbar is 120 but when i see the enemy 100 the health bar...
View ArticlePractical solutions for lag reduction?
I have a problem with a game system I have so far, there's no problems with any code, the enemies are made of many many little bits you can blow off with guns(The head alone has 35 parts.) The issue...
View Articlehow do i make enemy AI chase my player
hey guys, i want to make an enemy AI to chase my player. the code is working, but the enemy is behaving quite strange and the hitbox is gone and i cant shoot it. i'm just a beginner, i got the code...
View ArticleHow can i get a specific XYZ position from character's animation that still...
Hi. I'm learning to make simple 3D fighting game for my college. And now im still stuck how to make some simple enemy. Basically i want to make some simple enemy that can predict and avoid the...
View Articlehow do i make enemy ai chase player
this is my code. it works but the enemy ai behaviour is weird and the hitbox is gone, i'm a beginner and this is not my code private Transform target; public int MoveSpeed = 4; public int minRange;...
View ArticleEnemy health not reducing on collision with bullet
have different weapons, with one i would like to shoot real bullets, so i attached these two scripts to the bullet, but only the first works. are they interfering? using UnityEngine; using...
View Article