`UnityEngine.Transform' does not contain a definition for `positon' and no...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class EnemySpawn : MonoBehaviour { public GameObject enemyPrefab ; public float width=10f; public float height =5f;...
View ArticleLerp in Coroutine (Crazy Behavior)
Hey my friends i have a problem that i strugle on it for days now , i make an obstacle that goes up and stay some time and return down and stay for some times also, i make it move with the Vector3.lerp...
View ArticleEnemy shooting at player
Hi guys! So, I'm working on a game level for college that's due this Friday, it's a runner-type level with a helicopter chasing and shooting the player, however I can't get the shooting script to work....
View ArticleHello. I have a problem and it has to do with assigning variables to objects...
It sounds weird, I know, but I'm trying to make a body switch ability in my game where, if the player looks at an enemy and presses shift, they will switch places with said enemy. The problem is, I...
View Articlehow to destroy all gameobjects with a certain tag?
Hello all. In my scene there is a timer that counts down from 60 seconds. (not a coroutine just a visible timer). When it reaches "0", I want a function to get all the gameobjects that are in the scene...
View ArticleEnemies passing throught walls in fps game need help fixing this
Hi this is Richard Haley I have had asked questions before and had gotten no answer but I have this problem with the enemy AI models they keep on passing through walls in the First Person Shooter type...
View ArticleMore efficient way to spawn enemies in my game...?
Hi everyone! My game is a turn-based dungeon crawler where enemies have a chance to spawn every time the player takes a step forwards. It works, but I feel like it's way too mish-mash and inefficient,...
View ArticleSimple AI Roaming Script Help C#
I want to code to make an enemy move in a random direction every so often, so i have created a random number generator system where depending what number is called it moves in a different location,...
View ArticleKilling wrong enemy problem
Hello everyone, here's the problem. I made enemies as a prefab. If I jump on an enemy, it doesn't kill the enemy I stomped on, but the other one. I realized if I add more enemies, that it always kills...
View ArticleHow to make disappear enemy in unity 3d?
using UnityEngine; using System.Collections; public class ThrowObject : MonoBehaviour { public GameObject projectile; public AudioClip shootSound; public GameObject gun; public float throwSpeed =...
View ArticleHow can i delete my enemy
In my game, i can shoot bullet but i cannot kill my enemy. I want enemy disappear after i shoot him. Please help me. **I'm using two codes. One is Throwobject and another is monsterattack. Throwobject...
View ArticleEnemy variable remains null
I'm writing a knockback script for the enemies, so that they gets knocked back, but for some reason my Enemy gameobject remains null. The knockback script: using System.Collections; using...
View ArticleHow can i kill my enemy with unity-3D.
public class ThrowObject : MonoBehaviour { public GameObject projectile; public AudioClip shootSound; public GameObject gun; public float throwSpeed = 1500f; private AudioSource source; private float...
View ArticleEnemy Chasing player?
I'm having an enemy move back and forward and then when he detects the player entering a cube that is parented to him I want him to face the player and move towards the player. This is going to make...
View ArticleWhy my enemy starts to bump between two waypoints during its patrolling
Hello everybody. I attached the following script to an enemy patrolling a maze: using UnityEngine; using UnityEngine.AI; using System.Collections; public class Patrol : MonoBehaviour { public...
View ArticleHow to go on to next wave of enemies?
I am making a 3d wave survival game (sorta like black ops 3 zombies) and I already have a wave spawning system. I'm not sure how to make the game wait for seconds and then spawn the next wave of...
View ArticleHow to destroy enemy in unity-3D?
using UnityEngine; using System.Collections; public class MonsterAttack : MonoBehaviour { private GlobalInformation gi3; public int health; public bool isDead; public Transform target; //public int...
View Article2 players(not really) one camera, camera must prioritize one of them
So, I'm trying to make a script that put the camera smoothly with a lerp between 2 objects (or even 3) one player and one or more enemy. the problem is that if the get too far away form each other the...
View ArticleChange level once killed enemy
Hi guys I want to make it so the scene can change to another scene once i killed the last enemy. Here's my enemy spawner script public GameObject enemy; public Transform[] spawnPoints; public Vector3...
View ArticleHow can I change scene or Quit game after killing all the spawned enemies?
**I am experimenting with Survival Shooter project and I am spawning 3 enemies of 3 different types and i want to change scene or quit game after killing all the spawned enemies.** **this is my...
View Article