Author Topic: NGUI: HUD Text  (Read 164083 times)

SkaiCloud

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: NGUI: HUD Text
« Reply #225 on: December 17, 2014, 07:15:30 PM »
I made a damage text for a TD game. Each turret has its own hudtext so if they are attacking a target the hudtext will increment it's own damage. Each turret can also cause ability effect which will change the color of the text. Well imagine you have 6 of that turret shooting at one enemy. You will have texting bunched up in one area scrolling upward. A better approach to this is to randomize the text scroll either bounce left or bounce right so you can better see the damage.

It's important for player to see this damage so they can better understand what tower and what element is causing the most damage so player can upgrade their weakest element.

vivalavida

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: NGUI: HUD Text
« Reply #226 on: August 05, 2015, 06:06:56 AM »
Hi Aren,
1) What I'm trying to achieve is when an enemy receives multiple damages I want to reset all the animation curves but with the new value.(ie on first damage +1, on second damage within the duration limit it should show +2, but with position/alpha/scale curves reset). How should I go about doing this?
2)Also, is there a way to make the text curve towards the left/right while floating up?

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI: HUD Text
« Reply #227 on: August 05, 2015, 07:22:25 AM »
1. Modify HUDText's Add() function to reset the "stay" duration like it does on line 274. You will want the same setter to be right after line 259 and 265.

2. Yes, but to get that you will want to change the 1-dimensional "offsetCurve" to be something 2-dimensional instead. In short, you can, but you need to modify code.

AliceD

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: NGUI: HUD Text
« Reply #228 on: September 07, 2015, 05:36:49 AM »
Hello Mr. ArenMook,

I was wondering if the HUD text asset is compatible with the latest version of Unity and if it will be supported with future releases of Unity?

Thanks in advance for your response.

Best wishes and all the luck in the world,
AliceD
« Last Edit: September 07, 2015, 06:04:02 AM by AliceD »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI: HUD Text
« Reply #229 on: September 13, 2015, 06:31:48 AM »
It's still compatible, yes.

asims

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: NGUI: HUD Text
« Reply #230 on: November 21, 2015, 08:06:19 PM »
we can not print arabic words with hud text. Any arabic supoort yet ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI: HUD Text
« Reply #231 on: November 25, 2015, 06:39:58 PM »
You need to use a font that actually has the arabic glyphs in it, and it will work fine.

DJVDJV

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: NGUI: HUD Text
« Reply #232 on: January 19, 2016, 07:48:29 AM »
I want to make player name over character in game. How make it "permanent" so it does not disappear affected by curves?

+ I also want change name it during runtime.

How to do this all?
« Last Edit: January 19, 2016, 07:55:49 AM by DJVDJV »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI: HUD Text
« Reply #233 on: January 20, 2016, 08:32:05 AM »
Each game unit should instantiate their own "name" prefab and keep a reference to it. This way when you do unit.name = "Abc"; it will know to update the label's text.

I'm not sure what you mean by "does not disappear affected by curves". What curves? UIFollowTarget has an option "disableIfInvisible".

endless

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: NGUI: HUD Text
« Reply #234 on: March 05, 2016, 12:30:59 AM »
where are download link??

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile

AlexeyTsoy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 20
    • View Profile
Re: NGUI: HUD Text
« Reply #236 on: August 13, 2016, 08:01:05 AM »
does the NGUI: HUD Text is supported? Cuz last update was a year ago

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI: HUD Text
« Reply #237 on: August 13, 2016, 04:15:26 PM »
Yes, and it should still work fine.

AlexeyTsoy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 20
    • View Profile
Re: NGUI: HUD Text
« Reply #238 on: September 26, 2016, 06:58:30 AM »
Здравствуйте, не могли бы Вы подсказать, как отключать HUD Text на определенной дистанции от объекта, т.е. на расстоянии до 50 метров HUD должен быть включен, а если расстояние больше то выключен. Я пробовал менять значение "far" на камере, чтобы она не видела объект, но это ни к чему не привело, заранее спасибо за помощь.

AlexeyTsoy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 20
    • View Profile
Re: NGUI: HUD Text
« Reply #239 on: September 28, 2016, 02:42:00 AM »
Hello, could you please suggest how to disable the HUD Text at a certain distance from the object, ie, at a distance up to 50 meters HUD must be enabled, and if the distance is greater than the off. I tried to change the value of "far" on the camera, so it did not see the object, but it came to nothing lead, thanks in advance for your help.