• 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
16
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: 9
Last edited:
Level 14
Joined
Jan 10, 2023
Messages
256
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.
 
Top