My Eneny AI Script Wont Work?
Hey, here is my script for my enemy ai UnityEngine.Transform UnityEngine.Renderer var Distance; var Target : Transform; var lookAtDistance = 17.0; var attackRange = 10.0; var moveSpeed = 3.0; var...
View ArticleHow can you make an enemy follow you only when look away or blink?
Ok, I am beginner in unity, I'm trying to make a weeping angel game. I have a script that allows the enemy to move when i look away and it totally works fine. I then continued on to make a blinking...
View Articlehow to make a enemy health/die script.
I was using a gun script and i need a script that kills enemy's. if tried this script for enemy health. #pragma strict var Health = 100; function ApplyDammage (damage : int) { Health -= damage;...
View ArticleSimple enemy kill count
Hello, i need to create a simple enemy kill count, public class EnemyCount : MonoBehaviour { public int enemyKill = 0; void Update () { Debug.Log (enemyKill); } } I don't know how change this variable...
View ArticleEnemy tries walking through walls.
I am currently making a project using ufps and its enemy ai addon... i have created a building like structure using probuilder. When the player goes near the wall, the enemy start trying to run through...
View ArticleHow to stop the enemy from spraying bullets?
#pragma strict var player : Transform; var moveSpd : int; var rotSpd : int; static var dmg : int; private var life = 100; static var gotShot : boolean = false; var ball : Transform; var spwnPoint :...
View ArticleAnimation not found, but animation plays.
Hi, I have a script where an enemy is supposed to start a running animation when the player is in range, and move towards the player. I've got it so far that when I approach the enemy the running cycle...
View ArticleInheritance with enemies
Heyyo guys ! So i've created this code right here, and i wanted to do it so my enemies can inherit the movement and rotation code i've created. But, since im not good with inheritance and so forth it...
View ArticleHow to obtain Subclasses of a class/type?
Say, I have a class called EnemyUnit and multiple subclasses of it called EnemyArcher, EnemyInfantry, etc. I'm creating an AI for movement in a game and I want to have an EnemyArcher stay one space...
View ArticleEnemies not shooting laser on certain level
So in my enemy script, i have where i want the enemy to shoot lasers on certain levels. I got it where it can shoot on level 2, but when it hits like level 3, 4,5,6 and etc. they stop shooting after...
View ArticleIn a 2D game, what is best practice to use. Rigidbody2d or collisionboxes on...
I am building a 2d platform game. it has 1 character and lots of enemies. my char has a rigidbody2d and my level, collectibles and enemies all have 2d boxcolliders. For now my enemies move around using...
View ArticleBasic AI script. need help.
ok, so im working on a basic 2d AI script. The enemies are to simple home in on the player. however they dont go straight there, but have a steering limit... basically they have to actually turn around...
View ArticleWhen one enemy dies, all enemies die
Hi, I have being stuck on this and I can't seem to figure it out. Whenever I click on the enemy the enemy will die and re-spawn, however all enemies seem to do this. I m not sure why this might be...
View ArticleEnemy Wave Generator Spawn System Help!
Am developing a spaceShooter(3D Game) and got in to a wall. Am trying to create a enemy Spawn waves which will spawn 3 different types of enemies as listed below, infinitely. There will be 4 waves,...
View Articleenemy twitches and stops following player after leaving range
i have an enemy that follows the player, but when the character is far away enough from it, it stops moving and starts twitching. using UnityEngine; using System.Collections; public class...
View ArticleAnimation made in blender does not loop
i have a little skeleton that i modeled and animated in blender but when i imported it and i play the game, the walking animation does not loop. i the animation panel it plays fine and in the animator...
View ArticleHow can I acces the script of an object that I triggered?
Hello, I am working at a projectile script. The thing is that I want to be able to modify the health var from my enemy instance when the projectile triggers it. I want my projectile script to tell the...
View ArticleHaving the enemy ai animate the way it rotates
Hi, I currently have an AI set up that follows the player and stops to attack depending on the distance. The way the script currently is, whenever the AI rotates towards the player, it only spins in...
View ArticleNavMesh agent bug
I have an enemy and my character. Between them there is a wall. and the enemy should go around the wall to get to the character (using navMesh.setDestination() function), But he doesnt. he tries to go...
View ArticleEnemy AI Problem
Hello! I'm making a horror game in which the monster searches for you and if it finds you it starts chasing you. Everything Works fine, the monster is moving from one target to another and when it sees...
View Article