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

Enemy can see player throught walls problem!!

Hey guys i need help with enemy field of view!! Im using vector3 distance and angles but my enemy can see my player throught walls!! i need a litle help! Here is my script!: using System.Collections;...

View Article


Saving layout and enemy stats with Binary Formatter

So I'm using a binary formatter to save the variables of my script as well as I can. When it comes to the player, everything works perfectly. However I also have an interchanging map aswell as a list...

View Article


I am not able to make enemy ship come towards the player.

I am not able to make enemy ship come towards the player as per instructions contained in EvausiveManuever into the boundary. the script written by me is given hereunder:- using System.Collections;...

View Article

How do I limit the angle of transform.lookat function

I have searched on google and the unity answers site and still haven't found a solution that works yet. I would like the head of my enemy character to only move -+90 degrees. So like a normal person....

View Article

Spawning different random objects at the same position?

I've been trying to spawn two objects at random. But the random function generates only one random value at runtime, and so only one of the object gets spawned. I want both of them to spawn at random...

View Article


Enemies randomly appearing behind objects

Hello i'm new to unity so if i say something dumb please forgive me. I'm making a game for my class and i need to make the enemies appear randomly behind specific objects, to shoot at them. But i can't...

View Article

Get attacked by enemies when they spawn

hello! so i have this script to make the enemies spawn with a delay.. and what i need is that every time an enemy spawns, it attacks the player with a projectile. public class TimedSpawn :...

View Article

Limit spawn number

Hello! I need a little help, i have a script that makes my enemies spawn in four positions, but they keep spawning forever and i need to have, for example, ten enemies in the first level and after you...

View Article


Why does UNchecking apply root motion freeze my game objects?

So as the question states, for some reason whenever I uncheck the apply root motion box under the animator component, the enemy I am animating gets stuck in place. However, if I DO check it, it moves...

View Article


Enemy attack when it spawns

Hello! Sorry if this is a dumb question but i'm new to unity. Right now i have a script that makes the enemies spawn in four positions with a delay, but now i need the enemy to attack the player a...

View Article

Scrolling combat text works on enemy. When I duplicate and have two enemies I...

I created scrolling combat text to float over an enemy when they are damaged by a bullet. When I duplicate the enemy everything works fine and I have two perfectly working enemies. The problem is when...

View Article

Help with getting a bool from another script

Okay so I am trying to make a script reference, however the game object the script is attached to is being spawned by a wave spawner using the prefab of it. The game object that I have the other script...

View Article

How to make a bullet delay?

Hi guys i am currently coding an enemy AI but cant figure out how to make a delay between shots, btw i am coding in c#. Here is my script: using System.Collections; using UnityEngine; public class...

View Article


How do I use collisions for player/enemy interaction

I went through the 2D Platformer Controller tutorial and wanted to do some expansion. I want to set up a simple enemy that can hurt the player and can be hurt by the player. I am currently using the...

View Article

How do I stop my enemies from rapidfiring?

I'm attempting to create an fps enemy, but I am having an irritating bug. The enemies are shooting without delay, causing close combat to be impossible. If you can be help: Here is the enemy shooting...

View Article


Trigger and Collider?

Hello! So I am making an enemy that when the player enter its trigger, it prints Hello! (Just for a test) How would I make it where it does that, but the enemy still doesn't allow the player to move...

View Article

Player and Enemy collisions: Where should the Trigger/Collision method go, on...

Hi, I am creating a fairly simple 2D Platformer game and I was wondering if each instance of a deadly obstacle (i.e. bomb/mine) should have a script with the OnTriggerEnter2D method checking if what it...

View Article


AI script works, when we add a blocked function it stops working HELP

Hey, me and my friend are making a 2D platformer. My friend works on the AI and I work on the player mechanics. My friend ran into this problem that we can't solve, we are beginners to unity so our...

View Article

how can i do a headshot with a rigidbody bullet?

hey everyone, im using my computer to type this so apologies for any spelling errors. anyway, im making my game. and it is going well, but i thought it would be alot more realistic with head shots...

View Article

How to make a moving enemy shoot at the player?,Getting a moving enemy to...

Hi. I am making a top-down shooter and I was having an issue with getting a moving enemy to shoot at the player. The enemy in question shoots at the player's initial spawn but not at the player's...

View Article
Browsing all 1488 articles
Browse latest View live


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