bullet damage problem
I wrote a collision and bullet damage script, bullet is tagged as bullet and both are rigid bodies plus both triggers are checked so i can't figure out why it isn't working? using UnityEngine; using...
View ArticleJumping sound not working after respawning
I have a jumping script attached to a player. It works until i die and respawn. Any help? i am using javascript #pragma strict function Update () { if(Input.GetKeyUp("space")) { if(!audio.isPlaying) {...
View Articlehow player die and respawn?
how my player die when he hit on an object and how he respawn after that to right position?
View ArticleI loose health after touched enemy and my script only displays the first...
How do I fix so that if my enemy just touched me and stays out I'll regenerate instead of dying. And I'm trying to fix my healthgui. Help please? [Note: It's an edited script from speed tutor's fading...
View ArticleDeath screen on trigger enter?
Hi all, so I would like to add a death screen on a trigger enter. Figured it would work with 'isdead = true' ? I then want it to fade into blackness and show 'You died' I already have checkpoints that...
View ArticleHow do i stop player to move when dead
Hi. Does anyone know to stop player from moving and shooting? Here's my script for my health bar: var curHealth = 300; var healthTexture : Texture2D; var explode:Transform; var canMove = true; function...
View ArticleKill player when hit Groung (JavaScript)
Well, i'm making an FPS the map is like a roof, so when you fall and hit the ground, you die, i tried lot's of methods i found here in Unity Answers but none of them worked, so, basicly, when I hit the...
View ArticleHow to make player lose health every 2 seconds he is in a trigger?
Thanks in advance, this simple thing confuses me to much.
View ArticleHow do I respawn my character after I die?
I am making a game in which my main character is a PlayerCar and once a demon hits it, it "dies" and will respawn at the starting point. I have tried all kinds of scripts but it doesnt work and when I...
View ArticleAdding 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 Article