• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Show integer variable in ability help text

Status
Not open for further replies.
Level 9
Joined
Apr 19, 2011
Messages
447
Hi.

I need to know if there's a way to show the value of an integer variable in the help text of an ability.
In my proyect, items are used trough abilities, and it's obvious that the player will want to know how many items of that type he has before using it.
The quantity of items will be an integer variable.

Is there a way to show the value of this variable in the help text?

Regards
 
Level 14
Joined
Sep 17, 2009
Messages
1,297
So bad solution: Make the ability 50 levels, and always set the variable amount to the next amount. [At level 1 it shows 1item , at level 23 it shows 23 item in the tooltip]. And you will be able to change the ability level to the right integer amount.

Of course this prevents you from doing anything more with the ability, but it might also solve your problem.

I dont know other ways to mess around with the tooltips via triggers.

Hope i could help :>
 
Level 9
Joined
Apr 19, 2011
Messages
447
So it's impossible in WC3... I see. I already supposed that, but I wanted to ask before trying around other alternatives.

Anyway, I think I will use the solution kari0003 gave. The ability will have a single effect, so I can play around with this with no problem.
But, I have two more questions now, and I'll use this thread instead of creating a new one. They are the following:

- Is it possible for a non-hero ability to have levels?
- If I have an ability inside a spellbook, and that spellbook is inside another spellbook... will the action "Unit - Set Level of Ability for Unit" work for that ability?

Thanks in advance for your help.

Regards
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
Is it possible for a non-hero ability to have levels?
Yes it is possible. Just the only way to change the level of the ability is using script or researching upgrades.

- If I have an ability inside a spellbook, and that spellbook is inside another spellbook... will the action "Unit - Set Level of Ability for Unit" work for that ability?
It should work through any level of spell book (how invisible spell book trick works).
 
Level 9
Joined
Apr 19, 2011
Messages
447
I see.. OK then.
One last thing: you say that the level of an ability in a non-hero unit can only be changed with upgrades or with script. Can you explain with more detail that script? Or, at least, tell me where can I find this information.

Thanks for the help.

Regards
 
Level 14
Joined
Sep 17, 2009
Messages
1,297
:fp:He means this, nothing serious:
  • Unit - Set level of "Ability" for (Triggering unit) to variable
Ofc you can do the same via JASS if you want.

:fp:And you can change the level with upgrades the following way:
You create a new upgrade, and at Data - Effect you pick "Ability Level Bonus" You will be able to pick the ability, and the level bonus, so when the player researches the upgrade during the game, the level of the ability will increase at the effected units (Dont forget to check Techtree - Upgrades Used at the effected unit.)

:))
 
Status
Not open for further replies.
Top