- Home /
Ragdoll after healths gone
heres my health script :
//The script starts from here var full : Texture2D; var h9 : Texture2D; var h8 : Texture2D; var h7 : Texture2D; var h6 : Texture2D; var h5 : Texture2D; var h4 : Texture2D; var h3 : Texture2D; var h2 : Texture2D; var h1 : Texture2D; var h0 : Texture2D;
static var HEALTH = 100;
function Update() { var g_Health = gameObject.Find("g_Health");
if(HEALTH > 90)
{
g_Health.guiTexture.texture = full;
return;
}
else if (HEALTH > 80)
{
g_Health.guiTexture.texture = h9;
return;
}
else if (HEALTH > 70)
{
g_Health.guiTexture.texture = h8;
return;
}
else if (HEALTH > 60)
{
g_Health.guiTexture.texture = h7;
return;
}
else if (HEALTH > 50)
{
g_Health.guiTexture.texture = h6;
return;
}
else if (HEALTH > 40)
{
g_Health.guiTexture.texture = h5;
return;
}
else if (HEALTH > 30)
{
g_Health.guiTexture.texture = h4;
return;
}
else if (HEALTH > 20)
{
g_Health.guiTexture.texture = h3;
return;
}
else if (HEALTH > 10)
{
g_Health.guiTexture.texture = h2;
return;
}
else if (HEALTH > 5)
{
g_Health.guiTexture.texture = h1;
}
else if (HEALTH <= 0)
{
g_Health.guiTexture.texture = h0;
return;
}
}
I want to be able to make my character ragdoll after health = 0.....
please help me ragdoll AFTER HEALTH = 0!!!!
Thanks in Advance
There's not one thing here related to ragdoll. What have you tried/setup so far?
http://docs.unity3d.com/Documentation/Components/wizard-RagdollWizard.html
Have you seen the 3rd person shooter demo project? There is a ragdoll used. You can try following the setup they have.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
A node in a childnode? 1 Answer
Death upon health = 0 2 Answers
Terrain isn`t working PLEASE help 2 Answers
'else' not working.... please help:( 4 Answers