Adding a "Die-Event" to my Enemy-Script with OnCollisionEnter
I have an EnemyScript, that lets my animated Enemy target and chase the player from certain distances and returns to a set Startpoint, if the Playerdistance is to high. Everything works fine(more or...
View ArticleHow to stop camera from moving when the player dies (2D)?
hi guys, Maybe a noob question but when my player dies it falls backwards. My camera keeps track of the player so it moves with it. How can i let it stop moving when de player dies. (My game is...
View Articleplayer death sound not playing
i got my hurt sound to work when ever i come into contact with a spike but am not really sure why my death sound is not working public class playerHealth : MonoBehaviour { // declareing health...
View ArticleAnimation die
hello, im new to unity3d and im having trouble with the "die" animation. i can't seem to get it work. Here is my script: public int health = 100; public TextMesh tm; public AnimationClip dead; void...
View ArticleWhen I run game in device player velocity cannot zero when die in unity
In my unity2D game run in device so player velocity set not zero when collide with ground. void OnCollisionEnter2D(Collision2D target) { if (target.gameObject.tag=="Ground"){ die(); } } void die() { if...
View ArticleHow do I stop the enemy ai from following the player after it dies on unity3d...
When I shoot the enemy ai the animation plays . But the problem is that the enemy ai follow the player after it dies . Here is the move and attack script : using UnityEngine; using System.Collections;...
View ArticleHow do I disable enemy ai the script after enemy ai dies
I need to disable the script when the enemy ai die.Because what is going on is the enemy ai is follow the player after and before it dies . Here is the enemy ai attack, idle , and move script : using...
View ArticlePosition Calculation after player dies
I got Stuck Help me . In game player Car has weapons . When it destroys opponent vehicle is no more position calculation using WayPionts occur . I get error of reference execption . (...
View Articlecode so if 1 enemy isnt killed every 4 seconds player dies?
how do I code it so if 1 enemy isn't killed at least every 4 seconds the player dies? not sure if this is right code to put here but this script is on all the enemies enemies are instantiated every...
View Articlecode so if 1 enemy isnt killed every 4 seconds player dies?
how do I code it so if 1 enemy isn't killed at least every 4 seconds the player dies? not sure if this is right code to put here but this script is on all the enemies enemies are instantiated every...
View ArticleRestricted area for objects
Hi there peeps :) Kind of stuck on a script / activity ... the 2D game I am working on has good and bad Footballs flying about where if good one hits you ... you get a point but if the bad one hits you...
View Articlemultiplayer die and respawn
i am trying to make a multiplayer team deathmatch game but i have a problem. when player other then host died the the player still can use the playercontrol and player shoot that i disable . but it...
View ArticlePlayer Health Damage
Hi guys, I have this health script I created for my player, can any one show me how I could integrate damage and death when the player comes close to an enemy? This is the only thing not working in my...
View ArticleMy Player spawns 4 ragdolls when he dies!
So I have my player that can die when he either falls into lava or gets hit by the monsters, but strangely it spawns 4 ragdolls when he dies! There is only one ragdoll in the prefab that spawns when...
View ArticleHow to make death messages show at random?
I have a deathScript and need to know how to create different messages show at random once dead. Right now they go to console which is fine for now. What I need is a bit of script that will cause...
View ArticleWhen health is 0, character still lives
Hi all. I'm a total programing noob, and This script wont work. The idea is, when the health <= 0, he it should Destroy Object. However, nothing happens, and the Health counter simply goes negative,...
View ArticleUnity Engine GameObject error? help please
so some days ago I've been working on the AI, and it was working pretty well actually, now I was making random enemy spawner in random spawnpoints and I tried, I noticed that there was happenning a...
View ArticleHelp. how to die by looking at an enemy.
Like slender. anyone knows? :o i am new at unity xD
View ArticlePHP die/echo with value from table column...
So I am trying to retrieve data from my mySQL database through PHP. I don't know any better way to do this, so I am just simply using the PHP die(String); to return my variable from the table. I have...
View ArticleMake a Player Die on Collision { Urgent }
So basically Me and a few friends have been working on a Unity 3D project. We are nearing the End of our due date and we desperately need a direction to head in. Our game is a simple 3d game in which...
View Article