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

Raycasting help, enemy damage

Hello again, i have a question about raycasting and enemy damage. Here is my script.what i want to happen is if i shoot a raycast at an object tagged "Enemy" then health is taken away. var health = 150...

View Article


How to have an NPC with multiple parts detect damage

I have an enemy NPC built from several simple game objects (cubes, cylinders, etc.). I have followed a tutorial in making enemies take damage if they're within a certain range, and the code works fine...

View Article


Object Reference Not Set To An Instance Of An Object -_____-

#pragma strict var target : Transform; //the enemy's target var moveSpeed = 3; //move speed var rotationSpeed = 3; //speed of turning var attackThreshold = 3; // distance within which to attack var...

View Article

2D AI, Aim at player - even when jumping?

Guys I'm looking for a way to do essentially what LookAt() would do in 3D, my issue is the enemy is about two times taller than the player, the player can jump and the enemy is supposed to shoot at...

View Article

[C#] Enemy flys at Player

So im having abit of problems with my EnemyAI script. The script works fine on a flat ground but if my player say, climbs a mountain, instead of the AI trying to follow him up the mountain, he just...

View Article


Use enemy as trigger just for the char ( not the ground )

Hey, I'm making a 2D sidescroller game. I hope the picture is self-explaining ;P (While the enemy is set to trigger, he can walk through the char but cant fall down) ![alt text][1] [1]:...

View Article

How to make a enemy dodge/sidestep?

Hi all. I'm making a AI solution that I may put up on the asset store soon, but I need one more part to finish it. For enemy dodging, I have all the needed information (the enemy figures out if it...

View Article

How to index objects

Hi guys, im not sure if this is the correct terminology. But what I am trying to do is.. I have a health bar connected to a tower. When a unit is near it decreases. Works great. But when I have...

View Article


Need help with enemy respawn script

Hello, this is the script. Basically, it's mixed with the enemy health script so it's easier for me, I want to spawn more enemies as soon as the group that spawned earlier dies, for example, the game...

View Article


Spawn enemy if no other enemies are from the spawnposition

I have two types of enemies and four enemy spawn positions(each types has two spawn position). I want that a new enemy spawn when the player and one of the 4 enemies is dead and at least one of the...

View Article

Assigning Waypoints to an instantiated enemy

Hi, I have a 'Boss' that instantiates itself when all enemies are defeated. Here is the JS (attached to each enemy): public static var enemyCount : int = 3; function OnCollisionEnter( collision :...

View Article

Activating a 'boss' in the scene once all enemies are destroyed

Hi all, I've been doing A LOT of reading as to how I can get my 'boss' to appear once all the mini enemies are destroyed. Initially, I successfully achieved this via **instantiation**, but then could...

View Article

Problem spawning prefab enemy

So I am currently trying to create a script to spawn enemies every time the character respawns, but every time a clone of the prefab gets created the transform it should point to (The player) does not...

View Article


Targeting System Recommendation

I feel bad about asking another question, but I have been stuck on this. My game is a fantasy horde mode game, where the players have both melee and ranged attacks. I don't know what to do to set up...

View Article

Jerky velocity movement

Hi I'm making a vertical scroller 2D game that contains a crow as enemy that flies directly to the position the player is residing at. The crow is a prefab that is instantiated in a game pool at start...

View Article


car follow ai

I am making a game where the enemy car has to hit us. I tried a method where the car is constantly moving with certain velocity and tried lookAt and rotation damping also. But that doesn't produce...

View Article

How to allow player to kill enemy within a certain range.

I am making a 2D infinite runner game and i have my player working fine and my enemies working fine. At the moment my enemies are setup to die if the player presses the "a" key. But using the code...

View Article


Enemy attack/follow Player script?

Trying to write a script to get a skeleton (an enemy) to follow my character and attack when close enough by punching/swiping. I have tried adding colliders to the skeleton's arms and causing them to...

View Article

How do I animate my enemy randomly with time?

Hi there! I am currently struggling to animate my enemy character for a class project. Most of the answers I find about animation scripting are about the player character that animates with inputs or...

View Article

Spawning random enemies in spawn points

I have side scrolling game (almost) and I have a little problem with enemy spawnig. I already have spawn points located on map and whenever my BGLooper collides with spawn point it's gonna move...

View Article
Browsing all 1488 articles
Browse latest View live


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