Seems like the function doesn’t work. I tried to change ability missile art by this function:
Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: Poison Arrow's String Level Field: Missile Art ('amat') of Level: 0 to Abilities\Weapons\ChimaeraAcidMissile\ChimaeraAcidMissile.mdl
but nothing getting changed. Tried to replace Triggering Unit / Ability Code / String into variables but it doesn’t solve anything.
Ok here are my trigger events. What am I doing wrong?
- Ability - Set Icon of Orb of Annihilation to ReplaceableTextures\CommandButtons\BTNCorrosiveBreath.blp (works)
- Ability - Set Icon (Auto-Casting Activated) of Orb of Annihilation to ReplaceableTextures\CommandButtons\BTNCorrosiveBreath.blp (works)
- For each (Integer A) from 0 to 6, do (Actions)
----- Loop - Actions
---------- Ability - Set Tooltip of Orb of Annihilation to |cffc864ffPoison|r for level (Integer A) (works)
---------- Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: Orb of Annihilation)'s String Level Field: Missile Art ('amat') of Level: (Integer A) to Abilities\Weapons\ChimaeraAcidMissile\ChimaeraAcidMissile.mdl (doesn’t work)
1 Like
What are you trying to achieve? Do you want to change the ability’s missile visual during a match? Don’t you think it’s easier to just duplicate the ability, change it’s missile in the object editor and create a trigger to remove the first ability and add the new ability with the correct missile? It would be a matter of using the unit - remove ability, unit - add ability actions. Sorry if i’m misunderstanding your goal here.
Edit: I’ve just tested this. It works. My suggestion here works but i’ve decided to try your way and it works too. What i think you’re missing is that you’re not connecting the correct fields for the change of the missile.
For example, i’ve decided to change the “missile” effect of the demon hunter’s mana burn to become the acid breath missile. I used the same action you used: Ability - Set Ability String level field. In Unit - Get Ability I chose the demon hunter as the unit, chose [AEmb] Mana burn as the ability that will be changed and then i had to link the 2 fields that will make the “magic” happen, wich are the field of the mana burn that will receive the acid missile art, wich is the Art - Target field, and the acid missile field of the chimaera’s acid breath, wich is the path that you used: Abilities\Weapons\ChimaeraAcidMissile\ChimaeraAcidMissile.mdl -. So what i think you’re missing is that you’re not linking the correct field of your spell to the acid missile art. It’s not always Art - missile field to another Art - missile field. In mana burn’s case, it’s Art - Target to Art - Missile Art of the acid breath spell.
Yep I want make ability to launch 2 diferent missiles sequently. I can’t do it by replacing ability because:
- my hero abilities are based on spell book
- ability’s missle I want to change is Orb of Anihilation. Replacing it makes it unautocast.
1 Like
Correction, testing this again.
So what’s the correct Field to change Orb of Annihilation ability missile?
Edit: changed all the fields (caster/target/special/effect/area of effect/lightning effects/missile art) and none of them changed the missile 
1 Like
No that just worked for the mana burn kkkk. I’m testing another solution.
1 Like
What i have found after many tests is:
1 - Changing only the art effects only works for the Art - Target field, and only in non autocast abilities. Worked with mana burn but not with any autocasted ability. Changing the ligthning effects, missile art or target of autocast abilities turned these effects invisible.
2 - This can be done by the method that i told you, duplicate the orb of anihilation ability, put acid breath missile at the Art - missile field of the new ability, remove the first ability and add the new ability that has the acid breath missile in it. Using this methods solves your problem since it show all effects (target, missile, lightning, etc). You said that the problem for this aproach is that the new ability doesn’t come with autocast on but this is simple to achieve. Since your new ability is based on the orb of anihilation, just use Unit - Issue an Order with no Target action setting the order as Undead Destroyer - Activate Orb of Anihilation after adding the new spell to the unit, and that will make the new ability with the acid breath to come already turned on. Then you set an event to make the change happens and job done. Here is the trigger and the duplicated ability.
https://imgur.com/a/ksoHScS
You can also do this with triggers using dummies, etc… but this is the simple way man.
Yep triggering autocast - on/off solves part of my problem but how I detect that replaced ability was set autocast before replace? Orb of Annihilation doesn’t have any order order string (like searing arrows) to check with condition. For example
Unit - issues an order with no target
Issued order equal to flamingarrows
Unit - Add ability "Searing Arrows on check"
Then I would be able to check If unit has ability “Searing Arrows on check” and then decide if after replacing ability should i trigger turn on or not.
All I want is to make the same status as before replace ability.
There is also problem with my abilities system. It’s based on Spell Book and the Orb of Annihilation is also in this Spell Book what makes replacing it a bit hard.
I could make 2 levels of Spell Book with 1st type of Orb of Annihilation and 2nd type but that replaces all the abilities and reset their cooldowns.
By the way thank you for interesting.
1 Like
Hey man have you found the solution yet? If not, here is my answer: To detect if orb of anihilation is activated or not you have to use order strings or order integers. In this case i’m using order strings. But before i show you my trigger to detect the orb of anihilation state, here is a trigger to find any order strings or order integers in the game. It’s in jass, so i hope you know what jass is. If not just do a little search.
function Trig_orders_Actions takes nothing returns nothing
local integer order = GetIssuedOrderId()
call BJDebugMsg(GetUnitName(GetOrderedUnit()) + " has been ordered " + OrderId2String(order)+ " ("+I2S(order)+")")
endfunction
function InitTrig_orders takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddAction(t, function Trig_orders_Actions)
endfunction
If you don’t know what this is all about yet, just create a trigger named orders, click at the trigger, go to edit, click on Convert to Custom Text and paste this code in it, save the map. Test the map. Now all the orders you give to units, heroes, whatever, will be shown as a chat message, with their integers and strings for you to use in your triggers.
Now, back to the main issue. This is the trigger you can use to detect if orb of anihilation is activated or not. Orb of anihilation orders to turn autocast on/off are flamingattack, unflamingattack
https://imgur.com/a/TT9pLV5
The rest i leave it to you, you just have to decide what actions your trigger must do at then/else statements. I left a chat message and a comment just as a reminder of what you must do at these statements. See ya.
I saw once Blizzard fixed it and the missile changed after using above function, but after few patches it doesn’t work again so I come back again lol.