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

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 Article


My 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 Article


Play 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 Article

Spawned 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 Article

How 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 Article


How 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 Article

help 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 Article

How 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 Article


Run 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 Article


enemy 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 Article

Coins 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 Article

2D 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 Article

AI 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 Article


NavMesh 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 Article

How 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 Article


NullReferenceExeption

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 Article

NullRefrenceExeption

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 Article


Enemies 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 Article

How 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 Article

Push 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
Browsing all 1488 articles
Browse latest View live


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