Quantcast
Browsing all 1488 articles
Browse latest View live

How would I animate a 2D enemy with AI made with A*?

So recently I decided to get started on a pixel art top down RPG. It's the first game I've actually had the proper motivation to create but I recently hit a roadblock. I had followed a tutorial on how...

View Article


How to rotate the enemy in 2D top down

I use that script to rotate enemy but he stop at 90 and -90 deegres. Any solution Start rotation0/-90/90 public class LookAtSth : MonoBehaviour { public Transform target; public float rotationSpeed;...

View Article


Enemy Shooting problem with flip

I don't understand why my script doesn't work. When the enemy flips, he no longer shoots the player. https://youtu.be/bbsnh1B2_A4 here is a video. Any fix?

View Article

How to make an enemy stop and start movement in a tower defence game?

I'm making a tower defence game and I want to make it so that when the enemies hit an obstacle or and enemy infront, that they stop. When the obstacle or enemy infront is destroyed I want them to move...

View Article

topdown shooter unity

hello! ive tried to make a topdown shooter but when i made my enemies follow the player they just randomly speed up if i hit the player or rotate him. Do you have any ideas why does this happen ? Also...

View Article


Game lagging while looking for closest Enemy

Code of handling input making look for closest enemy: if (Input.GetMouseButtonDown(0) && !hitDelay) { AttackAnim(); if (closestEnemy()) { if (Vector3.Distance(transform.position,...

View Article

My enemy doesn't die when my player attacks, when I try to click space bar,...

This is my first time making a game, I've scrapped together a patchwork of code, and I've taken my notes. When I tried to put the code together though, everything seemed to be working. The animation...

View Article

enemt attack,enemy atack

I have multiple enemies and I want the enemy to shoot me but not all in the same time i mean that there is time between the attack of the enemy my code: using System.Collections; using...

View Article


[SOLVED] using var from another method?

i'm making a small top down open world zombie game and testing out if a player is in range of the zombie and if true then the zombie can attack the player. | i need the script to not be taxing as much...

View Article


get enemy to chase and shoot at player wherever hes facing.

i tried this but when the player gets close to enemy the enemy starts flipping back n forth super quick using System.Collections; using System.Collections.Generic; using UnityEngine; public class...

View Article

How do you apply animations to both the player character and enemy characters?

I'm looking to create a parity of animation control with both the player character and with enemy characters - that is, that the enemy animates about as well as the player character does, such as in...

View Article

Vector3 MoveTowards character flying up when told to follow,Vector3...

I have my "enemy" following another "enemy", yet instead of following, it flies up in the air right off the bat and moves on all the axis. public class BASICMOVEMENT : MonoBehaviour { Vector3...

View Article

Implementing Enemy Behavioral Script

I am trying to implement enemies into my game and have two ways to do so: 1. Have multiple behaviour scripts for multiples enemies Pro: Less messy Con: Affecting (damaging) enemies requires cycling...

View Article


Rigidbody and Collision Conflict in FPS game

Hello, I am working on a simple FPS game. I am utilizing an enemy controller script which requires the use of a rigidbody for movement. The rigidbody and the EnemyController script are all found within...

View Article

How i can spawn enemies of different types???

I want to spawn 3 or 4 different type of enemies at same location? i have written a script which only spawns two type of enemies at same location i am new to unity and c# please helo me here is my...

View Article


make player stuck inside of an enemy ,how to make a player stuck inside of an...

Hi, I am a newbie in unity and I need help. I have a jelly enemy that I want him to jump on the player (which he does) and that the player will be stuck inside of him and only be released if he will...

View Article

My enemies wont move!

I'm working on a 2d platformer, and originally I had enemies move between two box colliders, turning whenever it triggers one. This worked... until it didn't, so I looked up a tutorial for enemy...

View Article


How to make a game object detect if any of multiple game objects are in range

I am currently working on an enemy in a multiplayer game. I want it to be able to detect if any of the players are in range of it and then move towards whichever player is closest. I am using the...

View Article

How To Destroy/Deactivate one enemy without affecting other enemies of the...

Hi, I have a problem, I have a universal enemy script, which I use on all enemies, but as in the script when an enemy dies it is set to deactivate the current script and because of that the first enemy...

View Article

Server game object not syncing position after if statement

I am currently working on an enemy in my video game. It follows the closest player that is in range and then stops when in a certain distance from the player. Once that happens, it damages the player....

View Article
Browsing all 1488 articles
Browse latest View live


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