• 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.

Changing the missile

Level 2
Joined
Apr 16, 2025
Messages
18
Hello. I created an item that when activated gives the hero barrage for 5 seconds, like it temporarily attacks three targets. The problem is that I can't change the projectile type for each individual hero. I'm trying to determine the projectile type of the hero (it seems easy) and change the projectile type of the ability using triggers, but for some reason the last step doesn't work. I called the trigger that replaces the string "amat", but it doesn't work. What am I doing wrong?

Sorry, I had to convert GUI to JASS because my editor is in a different language.
JASS:
function Trig_trrtttyty__________________________________________u_Actions takes nothing returns nothing
    call BlzSetAbilityStringLevelFieldBJ( BlzGetUnitAbility(GetTriggerUnit(), 'Aroc'), ABILITY_SLF_MISSILE_ART, ( GetUnitAbilityLevelSwapped('Aroc', GetTriggerUnit()) - 1 ), "Abilities\\Spells\\Other\\BlackArrow\\BlackArrowMissile.mdl" )
endfunction
 

Attachments

  • 123.png
    123.png
    49.6 KB · Views: 11
Last edited:
Level 14
Joined
Jan 10, 2023
Messages
258
Last I knew many of those BlzSetAbilityBlahField()/BlzSetUnitBlahField() functions don't work for some fields.

This should be easy to test if you debug some of those values.
I would use BJDebugMsg() to test what level it is "Get"ing from the unit, and then input 0 and 1 directly for the level to see if it prefers one of them, I want to say it wants level "0" for level 1..

I get suspicious of the ones that are "LevelFields" but don't change per level, still I think many of them do work even not having a value that changes with level.
 
Level 2
Joined
Apr 16, 2025
Messages
18
Last I knew many of those BlzSetAbilityBlahField()/BlzSetUnitBlahField() functions don't work for some fields.

This should be easy to test if you debug some of those values.
I would use BJDebugMsg() to test what level it is "Get"ing from the unit, and then input 0 and 1 directly for the level to see if it prefers one of them, I want to say it wants level "0" for level 1..

I get suspicious of the ones that are "LevelFields" but don't change per level, still I think many of them do work even not having a value that changes with level.
The funny thing is that this field is not divided into levels. It applies to all levels...
 
Level 14
Joined
Jan 10, 2023
Messages
258
That's what I was getting at here:
I get suspicious of the ones that are "LevelFields" but don't change per level, still I think many of them do work even not having a value that changes with level.

I might be able to test it for you later, depending on how what I'm working on goes.

When in doubt BJDebugMsg() everything!
 
Level 14
Joined
Jan 10, 2023
Messages
258
Missile Art is not a level field, it is a string field last I remember.

Also, since Barrage is a passive, Increase and Decrease ability level directly after you change the parameter. Otherwise, your change won't be saved into the ability.
The only thing that was making me hesitate to say that is the constant's name ABILITY_SLF_MISSILE_ART, the SLF part, but they've been inconsistent enough so far with their variable names lol it's worth ruling out.
 
Top