Swipe to kill enemy? 2D
I have enemies that are constantly approaching my player. I want to be able to swipe across them with a finger to, essentially, cut them in half. For now, as long as they disappear, that's fine. I can...
View ArticleMy Cubes wont Chase me
I was working on another Game. This time I wanted my Cubes to follow / chase me along a Raycast. It seems like the PlayerPos part in my variablies does have some problems... var Player : GameObject;...
View ArticlePlay a variety of audio source objects from a for loop
Hi, I'm trying to make a simple kids counting game which displays each number (1-100) with the corresponding audio. In my script, I made public Audio Source variables and in the Inspector I linked the...
View ArticleSpawned enemy walk from right to left destroying turrets.
Hello Everyone, I'm new in Unity game dev and have some questions. I came up with idea to make a sidescroller game, but I have some problems. ![][1] [1]: /storage/temp/76002-game.png Green objects -...
View ArticleHow to make an enemy to deviate from shots?
I want to make an IA of my game . I need a way to get the shots (prefabs) in the game to compare with the enemy , and the enemy to deviate . I've already tryed to put the prefabs in the variables on...
View ArticleHow to change float animator parameters on an NPC object?
Searching for hours, the most relevant post with my issue was this (http://answers.unity3d.com/questions/1116799/2d-top-down-4-directional-rpg-enemy-animation-foll.html) and it is unanswered. I am...
View Articlehelp me script dreadout enemy error
using System; using UnityEngine; public class EN11_Babi : Enemy { private float _babiScale; public AnimState animState; public AudioClip[] audioAttack; public AudioClip[] audioChase; public AudioClip[]...
View ArticleHow do I code transform translate in unity3d/ Not working right
I had a problem with the enemy ai staying on the player . I did some testing and I found out that the transform translate the problem I am having when the enemy ai moves toward the player . The can't...
View ArticleRun coroutine only when player stays inside collider?
I'm working on a survival game right now and I have a line of code in my EnemyController.cs script that changes the variable "isAttacking" from true to false after a delay (through "yield return...
View Articleenemy look at GameObject player? unity ver. 5.2 C#
How do I make my enemy look at my player in the scene. I haft to use gameobjects because the enemy is spawned. Here is my script: public class enemymovement : MonoBehaviour { public float speed; public...
View ArticleCoins and Enemies 3d
My player, when colliding with an enemy dies, which is correct but when it collides with a coin it still dies T_T Here is the script for the PlayerMotor: using UnityEngine; using System.Collections;...
View Article2D Enemy Ai
I just can't get it to work. At all. he just shrinks into the ground, and he just shakes. It hurts my eyes too. **Enemy AI Script** using UnityEngine; using System.Collections; public class Character :...
View ArticleAI Enemy Goomba Style (Super Mario
Hi Guy! 1/q There is any way to know how can i make an Enemy Ai with the style of Goomba in Super Mario ? i have tried so many scripts but thyr not working right, 2/q do i have to make waypoints too,...
View ArticleNavMesh problem it does not respond corectly
I have a GameObject Enemy which is supposed to chase the player all around the game board using its NavMeshComponent. The concept is: the enemy has a SphereCollider of radius 6 and everytime the player...
View ArticleHow to make enemy explode after dying?
So far I have managed to make the enemy explode using a prefab however the enemy seems to explode constantly when I start the game rather than after dying. This is the enemy script: void Awake () {...
View ArticleNullReferenceExeption
Hey guys. I found this script in a older tutorial from 2015 and I cannot fix it. It gives me "NullReferenceExeption: Object reference not set to an instance of an object Spawner.OnEnable () (at...
View ArticleNullRefrenceExeption
Hey guys. I found this script in a older tutorial from 2015 and I cannot fix it. It gives me "NullReferenceExeption: Object reference not set to an instance of an object Spawner.OnEnable () (at...
View ArticleEnemies taking damage - help please
Hi, could anyone help me with my enemies taking damage? I have this script on my player if (hit.collider.tag == "Enemy") { hit.collider.SendMessageUpwards("ApplyDamage", damage,...
View ArticleHow to solve !
im working on a enemy script to chase te player if i start my game the enemy is already following my player but the player is not in range how to solve it ! using UnityEngine; using System.Collections;...
View ArticlePush an object behind itself with No RigidBody
Hi there, i'm trying to create an enemy that catches the player, and this one can escape repeatedly pressing a button... Then, i want to push the enemy behind himself when the player can escape from...
View Article