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

passive ability rotation with engineering upgrade

Status
Not open for further replies.
Level 17
Joined
Mar 21, 2011
Messages
1,597
Hey there.

I tried to make a passive ability that swaps the icon and tooltip every 4 seconds. it has 4 different forms and starts from the beginning as soon as it went through all of them. Now, first of all, what is the best way to do this? Add/Remove, Hide/Unhide, Engineering Upgrade? Are there any other methods?

As the passives give you separate buff effects, hide/unhide doesnt quite work, so i decided to give the engineering upgrade a try.

had a couple of issues:
-after rotating through all 4 abilities (which worked fine), it bugged out. that means if i set it back to level 1, the ability crashes. i have to say that the passive abilities are no hero abilities! so i had to shift click on the ability field and type in the ability codes. Another thing is that it does not change the buff effect, it always stays the first one.
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
I would not use engineering upgrade. I don't like this upgrade, because you can simply achieve the same with triggers, which do not cause as many problems.
I also had problems, that engineering upgrade caused a lag spike when learned, if used with custom abilities, but that was most likely, because the custom abilities need to be loaded.
What do you mean by hide/unhide? There is the options to disable/enable abilities for certain players, maybe you mean this.
I would use add/remove ability.
 
add remove ability sounds reasonably, you may use something like this Loop function to make your actions every 4 seconds:
JASS:
function Loop takes nothing returns nothing //this runs every second
    local integer modulus
    set counter=counter+1 // global connected to your unit
    set modulus=counter-((counter/16)*16)
    if modulus==4 then
   
    elseif modulus==8 then
   
    elseif modulus==12 then

    elseif modulus==0 then

    endif
endfunction
 
Status
Not open for further replies.
Top