Trying to send command for object without authority - Enemy
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; public class NetworkSpawner : NetworkBehaviour { public GameObject enemyPrefab; public...
View Articlehow to make player spawn creature
how to make player spawn creature that auto attacks characters with enemy tag thanks in advance
View ArticlePlayer can jump on enemy and not die
So im making a 2D platformer game and like most, there are enemies. My problem is my code for the enemies seems fine, the player touches them in any way, he dies and respawns at the beginning of the...
View ArticleHow to correctly do an enemy ranged attack script?
So i have been working on a game that is top down 2d rpg. i have an enemy who is supposed to detect if the player is within a certain distance and if so to start attacking by throwing a rock. right now...
View ArticleHelp with error when using instantiate to respawn an enemy.
So i've been working on respawning my enemies for a while now and I'm trying to get it working. Currently i have my scene set up with an empty game object with this script assigned to it to allow an...
View ArticleDetecting Enemy Distance via List
I have been attempting to create a system that detects all enemies inside a sphere collider and calculates their distance. So far, I have this which grabs all the objects and puts them in to a list,...
View Articlehow can i do that enemy cars start coming up from my 2nd level of the game ?
Hello, i already wrote my quesion in the first box. I'm on the beginning of my first game. I hope you can help me to figute something out and fix this problem that i can finish my game. The game is...
View Articlei'm beginner in unity ! my problem is i can't count the number of zombie...
#pragma strict var ZombieHealth : int = 100 ; function OnCollisionEnter (col : Collision) { if ( col.gameObject.tag == "Bullet") { ZombieHealth -= 25 ; } } function Update () { if ( ZombieHealth <=...
View ArticleHow to make my enemy discover, chase and lose player.
I have been try to find and try the code from google and unity3d.com, but still cannot work, maybe i dun understand. The code i using now is using System.Collections; using System.Collections.Generic;...
View ArticleWhy do the AI get caught on trees?
When I press play, and the AI spawn in. If I was away they get caught on the trees and objects.
View ArticleEnemy not taking damage on collisions.
Hello I need help with Enemy health and collisions. My problem is i have an enemy object with health script attached. The enemy would take damage when it collides with the player. When i test it the...
View ArticleI have an issue with the getting the enemy to be damaged by Raycast.
Hello there, I am currently trying to make a shooting game and I have used Brackey's video "Shooting with Raycast" as a reference. The thing is, I have successfully gotten my character to shoot and...
View ArticleEnemy shaking when following player
Alright! I have a issue with my enemy. Whenever I get withing a "chase" distance(which is in float), it it supposed to follow the player. Which it does. However, when it chases the player, it starts to...
View ArticleHow can I make a script to make enemy wander, chase, and kill player
I'm trying to make a simple script to make an enemy wander randomly, follow the player when the player is within a certain range of it, and kill the player when the two make contact while using it's...
View ArticleEnemy AI keeps chasing player even after the player has left its line of sight.
Hello and thank you for taking the time to read this question. I have a prototype of a basic AI which uses finite state machine to switch from patrolling around way-points to chasing the player when in...
View Articlehoming bullets
so have my enemy looking at player and shooting my prefab bullet but in my game I want my bullet to be an orb that follows the player till it hits them but I cant seem to find a code that works which...
View ArticleEnemy combat help
I'm trying to make a script where the player is pushed backwards and damage is done to them if they are touching the enemy, but I am having problems because the FPSController is kinematic and cannot be...
View ArticleHow to make enemy`s gun shoot directly on player and its allies from some...
I have and 3d model of enemy with gun and its animation I want to make that the enemy`s gun shoot directly on player from further distance at a place. And yes it fire my player`s allies soldier, also...
View ArticleUnity2D: Making a cloned particle system fire once only
I a have this enemy prefab that gets instantiated from a spawn point in my game, on the enemy prefab I have a particle system componet that if the player shoots the enemy more than 2 times the particle...
View ArticleHow do I prevent my player from pushing a jumping enemy off screen?
My code and two pictures are below any help will be greatly appreciated. The enemy in the pictures is the fish. 1 using UnityEngine; 2 using System.Collections; 3 public class EnemyJumper :...
View Article