Quantcast
Browsing all 1488 articles
Browse latest View live

How can I do health bar follows enemy?

Hi! I'm almost started to learning javascript and I'm doing exercises to get understanding of scripting. I'm trying to make a health bar following an enemy AI, but I don't know how to do it. I'm not...

View Article


How to change an int in a different class (for score)

So what i'm trying to achieve is that everytime a zombies health reaches 0 the players score is increased by one. I currently have no clue why this sin't working. Here is my code Code within the enemy...

View Article


Making a Multiplying Enemy?

I'm trying to make an enemy that multiplies into 3 versions of itself when I kill it. It's a slime enemy. So far I have an enemy that moves towards the player and just vanishes when hit by the players...

View Article

losing lives

I have made a code of when you enter the trigger of the enemy, you lose a heart. you have 3 hearts. when i get hit by the enemy, all my hearts go? WHY? #pragma strict var Lives : int = 3; var...

View Article

Enemy shooting player driving me crazy!

Please help me, I cannot for the life of me figure out what my problem is! So I have a game very similar to geometry wars. Enemies spawn and you as a player move around and shoot. The enemies direction...

View Article


Enemy Spawn script not continuing level

I have a enemy spawn script that spawns enemies and increases its level every 20 enemies that appear. So on level 4 i have an special enemy that appears but after you destroy the enemy the level does...

View Article

How to reduce the chances of a particular enemy spawning ?

I have an array of enemy prefabs inside which, I'm adding the different kinds of enemies I want it to spawn. Currently it spawns any enemy it wants to and there is no control over how many times I want...

View Article

C# Parameter questions 2D game

Hi I am pretty new to Unity and I need some help with parameters. I know that you can use bool parameters to transition from Any State to another animation. I have my animation set up and have my Any...

View Article


AI script troubles

I created an AI script, but it is having trouble. The enemy I'm putting the script on is supposed to be able to be spawned into the map multiple times, so i have to use a FindGameObjectsWithTag...

View Article


Spawning Statement Help

I have enemy spawner that spawns a basic enemy and a subboss, now the level increases everytime and the ships move faster after 10 ships has ran through the script. Now on level 4 i want my subboss to...

View Article

2d c# boss follow code

hello im creating a 2d game in unity and i need help creating a code for the boss. ive tried multiple codes and what not but non of them work. What i need is a code that makes the boss follow to player...

View Article

Spawner continuing after boss dies

In my spawner script I have it where every 10 enemies that run through the game, the level increases and the speed of the enemy does too. So on level 4 I have a subboss that comes through the game,...

View Article

Only damage one object with "Enemy" tag

Im making a tower defense game and i need my cannon to pick a target (first enemy that enters it's range) and shoot at it until it dies while ignoring other enemies, then pick a new target. Right now...

View Article


Particle effect before spawn enemy

Hello, i want to made a dual stick shooter game. what I would try to do is that before the spawn was created a small particle. But I have no idea how to do. This is the script that i use for the enemy...

View Article

Enemy Rotation Problem

Hey guys, I have a problem here. I have been trying to fix it but i just couldn't get it. I am still new in unity, started using unity about 7 weeks already. Okay, so i have this script of my enemy...

View Article


Enemy's gather around the player.. How?!

So I am working on some combat for my game... I have several enemy's wandering in an area. When the player attacks they will come towards the player. I use this code to get a position in front of the...

View Article

Enemy Spawn System Help Please!

Hello Fellow Developers! Am creating a rail space shooter style game. I want the enemy to be spawned at random location while looking at the target(player). Issue: I have managed to spawn enemy at...

View Article


2D Platformer, Jump on the enemies to kill them.

I'm creating a 2D platformer in Unity. I'm trying to get the player to be able to jump on the enemies head in order to destroy them. In order to test if the player is jumping on them or not, I'm...

View Article

random direction of enemy when collide whit wall

hello, I'm trying to move the enemies move randomly until they touch the wall and then again with random directions. this is the script that i used for the random direction public float speed = 5.0f;...

View Article

Extend only a part of an object unity

I want to make an enemy that comes into play when stretching the "tentacles" to touch the wall with everyone. If you then hit one of these tentacle disappears and if you hit one more time it disappears...

View Article
Browsing all 1488 articles
Browse latest View live


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