Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
maxhop

WHO CAN HELP ME IN Script health

Question

How was disendo will be that you can help me I have a script right script hp popularemente disendo wanted one boot Gui asim dynamic that takes Enemy The giving can be help me thank

 

 

 

Script

 

 

var health : float;

private var lastHitTime : float;
private var hitDirection : Vector3;
private var recoilDirecion : Vector3;
private var deathTime : float;
private var alive : boolean = true;

function Update(){
if( health <= 0 && alive){
alive = false;
deathTime = Time.time;
}
if (health > 0){
alive = true;
}
health = Mathf.Max(health, 0);
}

function SetLastHitTime(){
lastHitTime = Time.time;
}

function SetLastHitTime(setTime : float){
lastHitTime = setTime;
}

function GetLastHitTime() : float{
return lastHitTime;
}

function SetHitDirection(direction : Vector3){
hitDirection = direction;
}

function GetHitDirection() : Vector3{
return hitDirection;
}

function SetrecoilDirecion(direction : Vector3){
recoilDirecion = direction;
}

function GetrecoilDirecion() : Vector3{
return recoilDirecion;
}

function GetDeathTime() : float{
return deathTime;
}

function SetHealth(newHealth : float){
health = newHealth;
}

function GetHealth() : float{
return health;
}

 

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Sorry man, it's the bad section you need to ask your questions in the need help section and explain better because i didn't understand what you wanted to say. :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...