• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

TasAbilityChargeBox

This bundle is marked as pending. It has not been reviewed by a staff member yet.

Introduction


TasAbilityChargeBox is a small custom UI system for Warcraft 3 V1.31 or higher.
It displays custom chargeBoxes over the command buttons.

Details


Each CommandButton gets 1 custom chargeBox at the bottom right corner. This boxes are only displayed when the unit has a value set for an ability that occupies this button.
The value you set by a trigger function call.

This system does not work correctly when 2 abilities try to take one slot or in group selection.


Lua:
--API
function TasAbilityChargeBox.SetValue(unit, spellCode, value)
   enforce a wanted Value for that spellCode for unit
function TasAbilityChargeBox.GetValue(unit, spellCode)
function TasAbilityChargeBox.Clear(unit)
function TasAbilityChargeBox.Init()
JASS:
function TasAbilityChargeBox_SetValue takes unit u, integer spellCode, string value returns nothing
   enforce a wanted Value for that spellCode for unit
function TasAbilityChargeBox_GetValue takes unit u, integer spellCode returns string
function TasAbilityChargeBox_Clear(unit u)
function TasAbilityChargeBox_Init()

How to install


Requiers Warcraft 3 1.31+ or higher
  • Copy the TasAbilityChargeBox Folder (trigger Editor).
  • export (can skip export&import, if wanted)
    • war3mapImported\TasAbilityChargeBox.fdf
    • war3mapImported\TasAbilityChargeBox.toc
    • WHEN USING THE EXPORT ALL BUTTON, IT CAN HAPPEN THAT THE CONTENT OF THIS FILES SWAP
    • import them into your map
  • call TasAbilityChargeBox.Init() or TasAbilityChargeBox_Init() inside a trigger that runs at 0s.
  • Installed


ChangeLog


V1.b) works without fdf
V1.a vjass) small adjustments​
Contents

TasAbilityChargeBox (Map)

TasAbilityChargeBoxVjass (Map)

you change the event and then replace GetSpellAbilityId() with an abilityCode like FourCC'AHhb' or a gui variable udg_Ability which holds holy light.
  • Custom script: TasAbilityChargeBox.SetValue(GetTriggerUnit(), FourCC'AHhb', GetRandomInt(1,100))
Your system is really cool, you always have very good systems to keep the community active. Do you have plans to create a Jass version?
 
  • Custom script: TasAbilityChargeBox.SetValue(GetTriggerUnit(), FourCC'AHhb', GetRandomInt(1,100))
How do I use this script in the vjass version?
 
I experimented with Group selection and wrote a lib to know the current main selection, but for my own liking it is to expensive and requires Warcraft 3 V1.32+, while I mostly mod Warcraft 3 V1.31.1.

you could get the lib and replace the unit used in the system with the unit the lib gives you.
The mentioned lib has a bug in V2.0 which leads to crash, can be fixed by updating a line
Lua
local bottomUI = BlzFrameGetChild(console, 1)
->
local bottomUI = BlzFrameGetParent(BlzGetFrameByName("SimpleInfoPanelUnitDetail", 0))

vjass
local framehandle bottomUI = BlzFrameGetChild(console, 1)
->
local framehandle bottomUI = BlzFrameGetParent(BlzGetFrameByName("SimpleInfoPanelUnitDetail", 0))
 
Back
Top