Trouble with lives
I having an issue where when my player hit an enemy he dies as he should, but sometimes he loses 2 lives and others he only loses 1. I think the issue might be that my character has two colliders: a...
View ArticleEnemy not detecting player
Hello, I'm making a turret AI and have attached a trigger to it. Once the player enters the trigger the turret should look at it. In order to do that I created a bool variable which should become false...
View Article[Solved] Enemy Won't Affect Player Health?
So I have this script attatched to an invisible cube with a box collider that is a trigger attatched to my player... public var healthamt : float; var tex1 : Texture; private var attacked : boolean;...
View ArticleEnemy respawning after death
I have a basic enemy AI set up in my open world game, and i was looking at scripts that respawn the enemy, and short term they seem to work well but the enemies just chase you until youre far enough...
View ArticleMario-Like Enemy Death System Not Working
I wrote this script that is supposed to delete the parent game object (the enemy) when something, not just the player, collides with the object this script is attached to. When I jump on the enemy, it...
View ArticleHave Enemy Track Player By Bouncing RayCast Off Walls
I have a 2D top down shooter puzzle game. The player and enemies fire bullets that bounce endlessly until they hit the player or an NPC. The bullets themselves bounce like light, reflecting at exactly...
View ArticleFlipping enemy 2d character to the side he is walking?
I got the player flipping, but the enemy cant have the same code and I cant figure out how to check where he should be facing. Does anyone have any suggestions?
View ArticleShooting a Bullet with AI in Unity
Well as I am making a First Person Shooting game, however the bullet shooting from the enemy seems to spray shoot upwards and I can't do anything about it at all as I don't know how Unity works, so...
View ArticleEnemy not following player.
If you've seen my previous answer, this is sort of a followup on a different subject. I have a character (enemy) made in Blender and exported each individual mesh into a separate .obj file. after doing...
View ArticleEnemy Shooting bullet
Well I am making a first person shooting game but it seems like that my enemy only shoots upwards when I set the rotation of the spawn point as zero as well as following programs from youtube channels...
View ArticleScripting enemy path in 2D platformer.
I have coded it so that the enemy turns around when it hits the WallLeft, but for some reason it won't turn around when it hits WallRight. This .GIF shows the situation. http://i.imgur.com/ayTzKHv.gif...
View Articleneed help making a simple ascending enemy
So as the question says, i want to make an enemy that simply ascends after some seconds. I achieve this by using a coroutine. But when it comes to the actual code of making the enemy fly, and follow...
View ArticleEnemies push player a ridiculous amount.
I (Finally) finished my enemy character, but whenever i have more than one, the duplicates are acting weird. they behave fine, but when a player touches a duplicate, it sends the player away, really...
View ArticleHow to handle multiple colliders for one enemy and bullet.
Hi, In one particular enemy has two triggers. one is to detect when player enters it to activate it's firing and another one that detects when player bullets enter it. Imagine it's a turret with a...
View Articleeasiest way to make enemy movement patterns?
What is the easiest way to make enemy patterns in a platformer? (or any game for that matter). I'm trying to make a simple Goomba-like pattern (going from left to right and right to left) using...
View ArticleTransforming object on place of another object problem.
I have a problem with transforming one object on place of another. All I get with my script is that enemy is just disappearing. Here is code I am using: var hitPoints : float = 25; var...
View Articleenemy spawn and in game time counter
i need to make a enemy spawn the will spawn a new enemy after a amount of time and i need a a in game timer counter
View ArticlePlayer lives script
So i got a script that makes the player spawn and have lives everytime the player is destroyed by the enemy. The problem is the player will spawn in the beginning, but when an enemy destroys the...
View ArticleDestroy Enemy Rigidbody after Jumping on Head?
I'm making a 2.5D platformer, and before, I had everything working great, except the enemies had no physics at all. So I added a rigidbody to them so they could stand and move on the same platforms I'm...
View ArticleSimple Enemy AI not working : NullReferenceException: Object reference not...
so im trying to get some simple enemy AI down and when i get within the look distance of my enemy it goes yellow as expected, but then i get the error: NullReferenceException: Object reference not set...
View Article