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

Can you name something that you spawned with a spawner script?

Basically I have a c# code that spawns my enemy. Is there a way that I can declare it to a variable or something?

View Article


When I Destroy 1 Enemy They all Get Destroyed. PLEASE HELP

So Im making a medieval Zombie game, I finished my Enemy AI, it follows the player, it has a character Controller so it wont go through walls or anything, but whenever I kill ONE zombie, ALL the other...

View Article


Unity 2D Platformer Enemy flipping

I am making a 2d platformer and i want it so when the enemy is walking right its facing right and the same with left if someone can send me the code and tell me were to put it that would be great thx.

View Article

Why does this Enemy Behaviour script cause frame rate issues?

I've been working on this script for a while now and it does as it is suppose to. It does use the A*Pathfinding system to help me out with the movement, but I've narrowed down the script that causes...

View Article

Enemy controller.move script slows down and speeds up. How to get it consistent?

So I have a script for an enemy to move towards the player once he is within a certain range. I'm using a character controller for this as I do not need or want any physics effects. However, sometimes...

View Article


Enemy AI Help?

I keep getting a error when I try to use this enemy AI scrip. Here is the error "Parsing error" and here is the script- { var distance; var target : Transform; var lookAtDistance = 15.0; var...

View Article

How do I get GameObjects to look at me?

var player : GameObject; var speed : float = 1; function Start () { player = GameObject.FindGameObjectWithTag("Player"); if (!player) Debug.Log ("ERROR could not find Player!"); } function Update() {...

View Article

Random enemy spawning without using a radius?

So I am trying to make my enemys spawn in completly random parts along the x value. So I want them to always spawn at the same z and same y values, but a random x. How would I go about doing this. Also...

View Article


Enemy AI help

Hi guys, just wanted to say before I start that Im sorry if this is a rather large request, Im an 'artist' (air quotes) and so I cant really do coding, but Im slowly trying to learn around my current...

View Article


How to make my player not lose health when attacking the enemy?

I feel like this is basic problem but I have set up and enemy (sawblade) that upon colliding with the player will take away 10 health points. However, my player has a slide animation that i am using as...

View Article

Collsions problem

See i have a project im working on but cant get it to work. Cant make the bullet destroy the zombie for some reason. The script: #pragma strict var zombiedeathSound : AudioClip; function OnTriggerEnter...

View Article

Enemy health and bullet problem

[Edit]: This script is attached to the enemy, by the way! Hello, I'm having a little trouble with my enemy health script. I asked a question similar to this one a while ago, but I'm using my newer...

View Article

How to make the enemy move back to its waypoint after it's target killed?

Hi guys i have implemented the fps_tutorial AI script and its working for 2 enemy fighting each other. The problem is once the target is dead, the enemy will not go to its waypoint and just stuck there...

View Article


EnemyHealth.js script not working...

I have been working on this script for the past month and my collisions are not working... I have a drone and when a bullet hits the Sphere Collider, I want the drone to lose health and after it has...

View Article

How to make if the object == null then add gold?

Hi guys, okay my problem goes like this i have a damage script for the enemy in javascript then my add gold script is in C#, right now i wanted to make a C# script that able to state if the enemy is...

View Article


Enemy not generating...

need help... i am working on a zombie game. I have few issues 1. Enemies stops generating onces any of the enemy gets killed, enemy keeps generating till no one of them is killed. 2. If a head or arm...

View Article

can foe hear us?

I need some way to detect, can enemy character hear our player. I can check distance betwen player and foe, i can cast ray to check obstacle. But i dont know how to solve "corner" problem. Foe can hear...

View Article


Why enemy animation messes up the player ?

Unity 4.3, mecanim(animator) animations (legacy don't work - the sprites are on the keyframes but nothing happens), 2d game : The player shoots in front, when you hold W key another animation enters(a...

View Article

Monster doesn't move

I'm very sorry that I have to ask this, but I've been trying & looking up answers for about the past 5 hours now on something so simple... I have a spider that has to chase my player, without using...

View Article

how to find closest object with tag - one object

Trying to find the closest emeny - the hidden player Or find the next closest enemy can someone help me out var hiddenplayer:GameObject; var target:Transform; enemies = GameObjectsWithTag("enemy");...

View Article
Browsing all 1488 articles
Browse latest View live


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