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.

BlueElf

Newbie
  • Content count

    20
  • Joined

  • Last visited

Community Reputation

3 Neutral

About BlueElf

  • Rank
    Newbie
  • Birthday

Profile Information

  • Gender
    Male
  • Location:
    Europe

Recent Profile Visitors

228 profile views
  1. Thanks for sharing Great for use in games
  2. Hello to all I wanted to create a small game for space dog figth. I can not create a valid AI flight script for the enemy. Someone helps me understand how I can fly the enemy ship in a decent way. Thank you
  3. Thank you all for the will to help. Thank you
  4. Hello to all I have a problem In health count when I subtract the value in videos I propose -10 -20 -30 before to kill the player. I can not figure out where he mistaken, someone wants to take a look at the code I posted. It should work and yet nothing. Thank you. public class PlayerHealth : MonoBehaviour{ public GUIText guiSkin; public GUIText ValueText; public GUIText ArmourText; public int Health; public int Armature; public int MaxArmature = 100; public int MaxHealth = 100; //------damage texture------------------- public Texture DamageTexture ; public Texture2D DeathTexture ; public float regenerationSpeed = 5f; float time = 0f; float alpha ; bool Death = false; //public GUISkin mySkin; //--------------------------------------- void Start() { alpha = 0; Armature = MaxArmature; Health = MaxHealth; ValueText.text = Health.ToString("0"); ArmourText.text = Armature.ToString("0"); } void Update() { if (time > 0) { //time -= Time.deltaTime * regenerationSpeed; time -= Time.deltaTime; } alpha = time; ValueText.text = Health.ToString("0"); ArmourText.text = Armature.ToString("0"); } void applyDamage(int amount ) { if (Health <= 0) Health = 0; //return; Health -= amount; ValueText.text = Health.ToString(); if (Health <= 0) Destroy(gameObject); } void PlayerDamage(int amount ) { if (Health <= 0) return; if (Armature <= 0) { Armature = 0; ArmourText.text = Armature.ToString("0"); Health -= amount; time = 1.6f; ValueText.text = Health.ToString("0"); if (Health <= 0) Destroy(gameObject); } else if (Armature > 0) { ArmourText.text = Armature.ToString("0"); Armature -= amount; } } void RestoreHealth(int RestoreH ) { Health += RestoreH; if (Health > MaxHealth) Health = MaxHealth; } void RestoreArmature(int RestoreA ) { Armature += RestoreA; if (Armature > MaxArmature) Armature = MaxArmature; } void OnGUI() { GUI.color =new Color(1, 1, 1, alpha); GUI.depth = 1; GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), DamageTexture); } }
  5. Thanks for sharing.
  6. Thanks for sharing
  7. Thanks for sharing
  8. That's cool too good thanks
  9. var GUIShow : boolean = false; var noteText : String="******* Instruction *******\n Bla bla \n Bla Bla...."; function Start(){ GUIShow = true; yield WaitForSeconds(10); GUIShow = false; } function Update () { if(Input.GetKeyDown("h")) { if (!GUIShow){ GUIShow = true; } else { GUIShow = !GUIShow; } } } function OnGUI () { if(GUIShow) { noteText = GUI.TextArea (Rect (5, 5, 200, 300), noteText, 200); } } check out this Hello
  10. I like a lot I want to try it. thanks for sharing. I like the effects of the lenses. thank you
  11. But you have not written that no posting links with stolen models?
  12. Small and effective good Thanks for sharing
  13. We were all beginners once ... Never forget
  14. many good very good compliments
  15. Fantastic And thanks a lot ^'>