• 🏆 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!

Is it possible to make unit extended tooltip unique to every player?

Level 11
Joined
Aug 11, 2009
Messages
594
I am trying to change the extended tooltip on a unit in a building to show how much progress you have made to unlock it.

From what I could find you can only change the extended tooltip of items and abilities though, or did i miss the one for units? I found the "call BlzSetAbilityTooltip" custom script and tried to change it to "call BlzSetUnitExtendedTooltip" but that didnt work xD

I guess I could use the custom script: "if GetLocalPlayer() == udg_PlayerVariable then" to make it only affect one player. But is there any way through triggers to change unit extended tooltip?

EDIT: Perhaps it would work smoother to just use abilities instead of dummy units in a building? Since you can add requirements to abilities aswell to lock them from being used. It is only supposed to summon a Hero on use which could be done either way :)
 
Level 19
Joined
Jan 3, 2022
Messages
320
Doc - BlzSetUnitStringField there's this but it only works on individual unit instances. I don't know what hireable units in buildings are made of. Scripting abilities is certainly a good way to go.

Modifying texts async should be alright, just make sure not to acquire new handles within the LocalPlayer block, like you would do when getting an ability instance as an object: Doc - BlzGetUnitAbilityByIndex
 
Top