can someone show me how to play a death animation when a the game object is...
Basically i need help with getting my enemy in game to play a death animation when the game object is destroyed.
View ArticleWhy does only one object respond, while more objects have exact same script?
I have some enemies who are suppose to attack when a certain amount of triggerpoints have been reached. The triggerpoints are added by collision of player and item which is held in a different script....
View ArticleHow to I vary animations based on proximity?
I've written a script to animate a toon based on his location to me, with an 'idle' animation when he is out of attack range, a 'run' animation when he is within chase range, and an 'attack' animation...
View ArticleChecking Enemies In An Area.
Okay, I have a bunch of different sections scattered around the map. In these sections only so many enemies can be in at one time. How could I check which enemies are in the section. This would later...
View ArticleMove the enemy object opposite to player and keep its distance relative to...
Hi, I'm new to unity 3d.This is my first sample 3d game. I'm trying to create a script that dog will runs after the sheep, where sheep runs away from the dog to the opposite direction of dog ,when dog...
View ArticleMelee Damage script by collision
Hi, I'm working on a 2D game and I have been having some problems with melee damage by collision, I made this script: public class AttackScript : MonoBehaviour { public float damage = 50.0F; public...
View ArticleRemoving Missing Objects From A List
Hello, I have a list: public var enemies : List. = new List.(); That I put all of the enemies in a certain area in var hitColliders : Collider[] = Physics.OverlapSphere (transform.position,...
View ArticleRay from enemy to player is always a bit off (Image)
I've got a ray from the enemy to the player, and a line showing the ray in unity. The ray always seems to fire just to the side of the player, so it never actually hits. ![alt text][1] [1]:...
View ArticleDeal damage on collision
Hi, I want my game to work so if the enemy collides with the player the player loses 10 health but I don't know what to do and I've tried every tutorial out there. Please help I am desperate. using...
View ArticleEnemy not rotating when inside range
Hello, I have had this problem for a while but I have not been able to find an answer. When the player gets within a certain distance, the enemy rotates and moves towards the player. When he within a...
View ArticleInstantiate enemies around player
Hey everyone! First post, pretty new to Unity... I've had plenty of experience coding in Flash (AS3) and i know it's pretty similar to Javascript so i'm doin my best to my move skills from one to the...
View ArticleNeed help with AI in multiplayer
I'm working on a coop horror game. I attached this script to an enemy, so it will follow the player: var Player : Transform; var MoveSpeed = 4; var MaxDist = 10; var MinDist = 5; function Start () { }...
View ArticleOnce game is built, it crashes when enemy dies.
Hey guys, so I got this problem; when I build and run my game and kill an enemy my game just closes like it crashed. This happens everytime with every enemy. When i play the exact same game in Unity it...
View ArticleMore Efficient Enemy Spawning Than This?
I'm making a bullet hell game (shoot-em-up with a TON of bullets), and I'm wondering if there's a more efficient way of spawning enemies over time than what I'm doing right now. Basically I want to...
View ArticleWaypoint System help
Hello, I have my enemy that follows the player around when he gets into a certain range. When there is no target nearby/if he loses/kills the target, he should walk aimlessly around. When he is walking...
View ArticleHow do I make it so my enemy is hit 8 times and is destroyed?
i know there are other posts about this... but i have scoured the internet and have found nothing that solves my problem. i have a bullet prefab that my character shoots with a altered script i used...
View ArticleEnemy Detect Player's Raycast
Hello! Basically I am making a zombie fps, and have made it so i have a working gun, which is using raycast. What I want, is some help making my zombies detect the player's gun's raycast. Then...
View ArticleTrying to write enemy spawn in JS.
I'm very new to programming, so far this is what I have; var enemyType : Transform; var enemySocket : Transform; function Update () { if (Time.time >= 5) { Spawn (); } } function Spawn () {...
View Articleshooting script wont damage enemy
i am making a zombie survival game and i ran into a problem that is when i shoot my gun using raycast at my enemy its should kill him but it does no damage until he is almost 2 feet away. shooting...
View ArticleHelp with my Enemy AI script!!
Hi All.. OK needing some help with this script.. ok works like a treat however the enemy doesnt move until i attack!! i need it so when the player get close to the enemy, the enemy moves toward the...
View Article