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

Unity3D : Enemies following the player keep moving through each other

Hi, I'm trying to make enemies follow the player, but also for them to collide with each other and other objects in my game. The "following" part works (I found some help for that here already), but as...

View Article


How i end a game if i kill all enemies?

After kill all enemies, how should i finish the game.

View Article


Make enemy object move left or right direction position,How to move the enemies

I'm a beginner programmer so I'm not sure how to approach this line of code. The error says something about"unity local function not available in c#4 please update" I'm using an older version of Unity...

View Article

Enemy ia fliping when hitting object

Hi, I want my enemies to flip and go the opposite direction they are comming from, so far when they hit Bush, and Bush2 it works, but I also want to do that when hitting an enemy, ty! public float...

View Article

Unity3D-How to set Enemy attack max distance?

using UnityEngine; using System.Collections; public class MonsterAttack : MonoBehaviour { private GlobalInformation gi3; public int health; public bool isDead; public Transform target; //public int...

View Article


Displaying the total number of enemies & updating the number of enemies...

I am building a first person shooter game using Unity, UFPS, and Shooter AI. I am still a beginner in both Unity as well as C#. I want to display the total number of enemies initially and then the...

View Article

How can I get a game object to follow another?

Hello all, I have a player that only moves along the Y axis and I have a stationary enemy. How can I get my enemies eyes (2 sphere game objects) to follow my player's movement up and down? I've tried...

View Article

Make enemy move up and down by itself in 2D space?

Well the question says it all pretty much. So if you have played the Mario games, there is a turtle that flies up and down making it difficult for Mario to get through. Well that is what I am trying to...

View Article


I am trying to make my enemy AI have an attack delay

right now my enemy AI attacks the player when in range but when it attacks it doesn't have a delay I've tried many different things to find an answer but none seem to work can someone help? My code...

View Article


Problem Spawning Enemys with Health.

I am trying to create a side scrolling game sort of like Gradius and I am spawning in enemies at random positions at the edge of the screen so it looks like they fly in. Right now I only have one enemy...

View Article

How to make a WinText after killing the last enemy?

I have several objects (any number). After destroying everyone in the right order (e.g 1-4) should appear: "YouWin". Unfortunately, I do not know how to creating a method on a central square, when a...

View Article

I need help making my enemy AI have an attack delay

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; public class EnemyAttack : MonoBehaviour { public int nulldamage = 0; public float attackDelay = 10;...

View Article

Rigidbody will overwrite children colliders, and collision events won't run.

So... I have an entity, and it has 6 hitboxes (cube-collider, is not trigger and children of entity) what detects the gun bullets. It works fine but I want to add to my entity Rigidbody. And if I make...

View Article


Locking on to enemy, player can only move towards enemy, not away?

I'm working on a lock on function and so far I can lock on to the nearest enemy, but my player can't move around the enemy, i can only move towards it. I have my project setup so that the camera is...

View Article

Need help for programming the killing of an enemy

How do I make a code in C# that basically says, "if a float (named health) changes from a positive number to a negative number or if the number changes to 0, then.............)" I didn't want to say...

View Article


Multiple targets with navmesh?

I have a 2 player game. I need the navmesh enemy to pick a player to chase(preferably when it enters a trigger or by distance or even random if need be). If one player is destroyed how can I swap the...

View Article

Trying to make the enemy fire

Im trying to get my enemy to fire fireballs. I used ontriggerenter and a trigger box collider and it works but i need it to continue firing while the play is in the trigger. But when I sued...

View Article


My Tower is acting weird (shooting at one enemy, killing different enemy)

Can someone tell me what's wrong here? It looks like my tower is shooting at one enemy, but killing a random enemy on hit. I believe it has something to do with the UpdateRange function. The code about...

View Article

2D Roguelike Enemy in Walls

I have been working on the 2D Roguelike tutorial with my students. The game is working great, but we all have the same issue. Occasionally, the enemies will spawn on the same block as an interior wall...

View Article

If I duplicate enemies, will their scripts mess each other up?

Like for instance, if there are 2 of the same enemies in the map, and one of them attacks me, will the other attack too? because they have the same scripts on each other, and my guess is if one of 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>