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

Getting an array of gameobjects with a certain tag

I'm making a game that's similar to Binding of Isaac. There's a room with 4 doors and I want the doors to open after all the enemies are dead. I tried this code using UnityEngine; using...

View Article


Keep GameObject destroyed on returning to the scene

Scenario: You are in Room A with enemies -> You kill the enemies -> You go to Room B ( `Application.LoadLevel("Room B");` ) -> You return to Room A ( `Application.LoadLevel("Room A");` ) and...

View Article


Teleporting to outside of constraits

Hi all, I have been working on a slender like game and I have come across a problem, my enemy seems to fly. This is not my script. Also the enemy teleports way outside the constraints I have assigned...

View Article

How to make ball AI

I want to create an enemy for the roll-a-ball tutorial that follows the player and has acceleration. here's the current script: using UnityEngine; using System.Collections; public class Homing :...

View Article

Half-issue with find enemy script

HI guys this is the script that i write, i know that is not the best should be work but don't ,or better work but to half script more or less and i don't understand why. The script : var teamMan :...

View Article


Multiple ennemies with the same AI script

Hello, I have a problem : The oponents are instantiated from a single prefab (A Map prefabe that has ennemies). These enemies has a script that makes them move and fire (I'm in 2D). But they all are...

View Article

Enemy AI Script

I have this script that makes the enemy follow the player, but for some reason i keep getting errors and i don't know why. var target : GameObject; //the enemy's target var moveSpeed = 3; //move speed...

View Article

Using polymorphism in enemy subclasses C#

Hello, I am very new to Unity and I'm working on a project that is requiring a polymorphic collection of enemies (3) and weapons(3). I must have an enemy class with three subclasses which have to...

View Article


Attack/Kill Difficulties

What I want is when DamageDealt hits 3, the object that was attacked will be destroyed. So far, all it does is to destroy the weapon the player is holding, and not the gameobject that is being killed....

View Article


Random Spawn timer

So I am trying to spawn random enemy objects at a semi random interval. The questions and answers on here are way more complicated than the code I have landed on. Here is what I am using: void...

View Article

Shooting enemy to spawn them

I'm creating a boss enemy and I want it to spawn it's own smaller enemy's to help it in the fight but I want the boss to fire the enemy's from it's cannon and have them land someone while the player...

View Article

How would one go about creating different types of meshes for a part of the...

I have wondered this for a while about making a enemy arm or leg or any body part change to something when damaged. Would I have all the models in one file with the same skeleton or create different...

View Article

Why is my player dying when defeating an enemy?

I'm currently making an endless runner based game in c# wherein the player encounters enemies and defeats them by jumping on them. The problem however is when the player jumps on an enemy and kills...

View Article


Shoot 'Em Up: Best way to instantiate enemies

First off, I'm not an english native speaker, so sorry in advance if it's a bit hard to read. I am developing a 2D shoot'em'up and I've been working on boss fights, enemy scripts, designing backgrounds...

View Article

Move enemy only touching border

I want one of my enemy moves only at borders of surrounded area. My enemy must touch any side of border and continuously move around its limit. Surrounded area is completely dynamic as per main player...

View Article


enemy ai walking randomly and stopping

hi there i am trying to make a game where when you right click on the enemy you initiate battle with them but i also want the enemy to walk around randomly and then stop and wait for a bit and walk...

View Article

No player is colliding with enemy even with capsule collider !!! Please me...

hello everyone, and the next , I have a player and an enemy with navmesh the scene , the enemy is following , killing the player, all right , but the problem is that even the inimingo having a capsule...

View Article


How to stop Enemy when dead

So..I have an enemy game object which is a skeleton. It runs towards the player if the player is not in range, and if it is, it will attack. Attacking consists of an animation that loops so long as the...

View Article

Why does my enemy teleport to my player?

I'm running into a glitch where my enemy is teleporting to my player. Can anyone help me to rewrite the code so this doesn't happen? Link to video showing enemy glitch teleport....

View Article

Enemy moves randomly within a area.

As the title says, I want to have a script that will make a enemy randomly move to a point within a area and then move to the next random point in the area and so on. However I don't really have an...

View Article
Browsing all 1488 articles
Browse latest View live


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