Quantcast
Channel: Questions in topic: "enemy"
Browsing all 1488 articles
Browse latest View live
↧

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 Article


Why 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 Article


How 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 Article

Checking 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 Article

Move 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 Article


Melee 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 Article

Removing 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 Article

Ray 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 Article


Deal 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 Article


Enemy 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 Article

Instantiate 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 Article

Need 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 Article

Once 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 Article


More 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 Article

Waypoint 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 Article


How 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 Article

Enemy 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 Article


Trying 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 Article

shooting 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 Article

Help 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
Browsing all 1488 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>