- Joined
- Feb 17, 2020
- Messages
- 2
So I have a passive ability that I want to basically have a certain percent chance to cast a no target ability. It's a custom ability, so I have to use a custom script to call it by its id. I've attached a screenshot of my trigger function, and as you can see I basically create a dummy unit, teach it the ability, set its level, and then use IssueImmediateOrderById(GetLastCreatedUnit(), 'A024') to tell it to cast, but the spell is not cast despite everything else working.
I tried using PauseUnit and commanding it to stop before casting as well incase something was getting interrupted but it didn't change anything. The unit does learn the ability however, and it's always set to the correct level, and when I tell it to remove the ability after it's issued that works as well, so I know that accessing the ability this way is working for me, just not the command itself. I can also select the unit and use the ability if i don't remove the unit or ability in the script.
I tried using PauseUnit and commanding it to stop before casting as well incase something was getting interrupted but it didn't change anything. The unit does learn the ability however, and it's always set to the correct level, and when I tell it to remove the ability after it's issued that works as well, so I know that accessing the ability this way is working for me, just not the command itself. I can also select the unit and use the ability if i don't remove the unit or ability in the script.