Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Arpheon · Jan 29, 2013 at 11:13 PM · damagebloodhealth

Tunnel Vision Health System

alt text

How would I go about making a health system like this one? I am new to scripting so please explain fully. Thank you.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Berenger · Jan 29, 2013 at 11:17 PM

This is merely a texture display on screen on certain conditions. To go about that, you can use GUITexture, or GUI.DrawTexture.You'll have to play with the alpha, to make it fade in and out, based on your player's health. That will help, probably.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image schaddemm · Feb 02, 2013 at 09:27 PM 0
Share

GUITexture + Transparency is an awesome solution for UnityIndie. Since the image gets more transparent towards the center you can get a continuos effect with just 1 image.

avatar image Berenger · Feb 03, 2013 at 12:32 AM 0
Share

Unless you want something more complicated, like $$anonymous$$ass Effect 2 where veins seems to grow toward the middle the more you get hurt.

avatar image
0

Answer by schaddemm · Jan 29, 2013 at 11:25 PM

I you use UnityPro you can use ImageEffects, if not you could use a guitexture. Like you make a couple of gui-textures (25% 50% 75% 100%) and display the appropriate one based on his health

 if (health<50){
 // Assign someTexture to the gui
 Texturevar someTexture : Texture2D;
 guiTexture.texture = someTexture;
 }
 if (health<25){etc}
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by GeoHazard · Feb 02, 2013 at 08:46 AM

Hey man, Without a doubt the absolute best method is the "screen overlay" script, this is a Image effect only available through unity pro. It looks excellent, you can use any .png image, any color e.c.t then get onto scripts such as the excellent method Schaddemm suggested :)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Health and damage reciever 1 Answer

How to implement an attack in this script 1 Answer

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

How to do basic health & damage on collision 1 Answer

Health Bar Only For Falling Damage 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges