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

please help! i am making an anemy wonder but it does not work

public float movespeed = 3f; public float rotspeed = 100; private bool iswandering = false; private bool isrotleft = false; private bool isrotright = false; private bool iswalking = false; void...

View Article


Rapid fire does damage every frame

I have a script for Rapid fire. Apparently it damages enemy each frame. But I want the damage to happen ONLY when a bullet is fired. Here are the enemy script, gun fire script and gun damage script....

View Article


How to instantiate the whole object with script attached to it ?

Hi, so I am making a clicker game. There is a player. He is shooting an enemy. After the enemy is dead, I want to spawn another one. I figured out that I have to make a prefab of enemy. There is a...

View Article

Switching Target

Hi guys, having a bit of an issue with something that I am fairly sure is quite easy to fix, essentially I am making a clone so when the player clicks a button, they instantiate a look-alike that the...

View Article

how can i make the enemy kill more players one after the other chasing them...

Transform player; // Reference to the player's position. PlayerHealth playerHealth; // Reference to the player's health. EnemyHealth enemyHealth; // Reference to this enemy's health....

View Article


Unity2D Need Help in Multiple Enemies Shooting Script

Hello Guys, I am new to unity and i am having some problem with my enemy script, i made my enemy in a way that it has a trigger collider attached to it and it my player comes into the trigger the enemy...

View Article

Enemy Health Bar Fill (Unity2D)

So I have a Enemy. I have a enemy script with health and such, and I have a script which deals damage to the enemy, I have a healthbar with fill that is a child of my enemy i wnat it to represent my...

View Article

Player deals damage to all enemies

Hello, I am a little new to unity (started about 3 months ago), and I am currently having an issue with my attack script. I used the following video to make my character's attack system:...

View Article


Trigger is not detecting tag

That's my code: void OnTriggerEnter(Collider col) { Debug.Log(col.gameObject.tag); if (col.gameObject.CompareTag("player")) { Debug.Log("Player died"); agent.setTrueIfHitPlayer();...

View Article


GUI Healthbar not following the enemy

**GUI to world position for GUI Button not working on landscape (Only works on portrait)** ** I'm making the healthbar for enemies. The healthbar works and follows enemies very fine in portrait mode of...

View Article

Problems with spawnpoints

Hey I'm programming a game where the player has to shoot three enemies in a map. If the player shot all of the three enemies, the spawnpoints of them will be changed and they will spawn at the new...

View Article

How to make a customizable variable in this script?

How do I make the damage to the player a customizable script as I want all melee enemies to use the same script but with different damage and it would take too much resources to duplicate and lightly...

View Article

I have written these two enemy scripts but the enemy doesn't move? (2d)

![alt text][1] alt text ![alt text][2] [1]: /storage/temp/130242-enemyattack.png [2]: /storage/temp/130243-enemyhealth.png

View Article


Teleporting Script Doesn't Work With Anything But The Player

Hey everyone! I have made a teleporting script and it works perfectly with the player. So when the player collides with the object tagged "teleportPad" it teleports to a game object specified. No...

View Article

Enemy ai Ignore walls! help!

Hello, it turns out that I have created an AI script that works like this: the enemy has a distance of detection of the player, when the player enters that area, the enemy looks at it until the player...

View Article


Guard AI acting real weird - Please Help!

Hello! I am still very new to this whole Unity thing but I'm absolutely loving it. I have encountered a big problem in my first 2d game with my Guard AI. The game design is very simple; guide the...

View Article

Enemy VISION range? Help!

Hi guys, I tell you that I created myself (and passed ac #) an AI script, but the detection system is very strange, example: I am behind the enemy and I see the same, that is, it would be better to...

View Article


How to make a Raycast enemy?

Hi, I have created a script for an enemy but, it has a RADIAL view range, that is, if I am behind it it detects me the same, Supposedly it can be created with Raycast but I do not know, I searched but...

View Article

Increase speed over time enemy

Hi there, i am trying to create a enemy who spawns and move towards y position with my knowledge i got this.I can move the object on Y position, but cant make it increase speed over time. private...

View Article

Guard AI is off - Please Help!

Hello! I am still very new to this whole Unity thing but I'm absolutely loving it. I have encountered a big problem in my first 2d game with my Guard AI. The game design is very simple; guide 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>