- Joined
- Jan 10, 2023
- Messages
- 248
Hello all, I had asked some related questions and got a lot of good answer's from @Uncle, and I would continue to message you Uncle, but I feel like maybe I shouldn't blow up your inbox just because you're nice lol (just saying that so you understand why I'm asking this now, Uncle).
My question is two-fold:
What I did works fine to stop the ability once it has finished it's effect, even if I give an obnoxiously high follow through time like 100.00.
This is what I am doing to end the ability's effect:
I was super excited when this worked, I'm not surprised if this is old news, but it worked great for ending the effect, but it does not help to end the channeling.
It does work to cancel/stop casting and seemingly every spell event except channel.
I could simply reimburse the unit's mana, but I grew attached to this concept working at the channeling step in hopes to prevent the mana from being spent in the first place, and also to allow for a Map Editor to set a channeling-time if they so choose.
I know there are other options, but I am concerned that I don't know what are good practices for compatibility, and a lot of the threads I find when I search ended back in 2016 and sometimes (such as with @IcemanBo's suspendunit system) everything looks like it would work great, and then I get to the bottom of the thread and there was some bug that ended the whole effort.
Anyway, in particular I am curious if compatibility is a requirement, a nice thing to do, or simply a matter of preference, because I am sure I can find many ways of getting it done if I assume we are all using the most up-to-date wc3, but my intention is just to make systems to enable makers to make cool stuff and I like to think we would all use the current version, and I don't really want to study ancient wc3 history to do that, but I guess if it's the only way I will...
I know this topic is kind of two-in-one, but to make it simple what I am asking:
My question is two-fold:
- Am I right to shun most Blz natives because they won't be compatible in older versions?
- Do we have an up-to-date thread that gives instruction on compatibility requirements for systems?
What I did works fine to stop the ability once it has finished it's effect, even if I give an obnoxiously high follow through time like 100.00.
This is what I am doing to end the ability's effect:
JASS:
call PauseUnit( u, true )
call UnitRemoveAbility( u, abilcode )
call PauseUnit( u, false )
if UnitAddAbility( u, abilcode ) then
call SetUnitAbilityLevel( u, abilcode, abilLevel )
endif
I'm guessing there are other ways to do this, and maybe the order of actions here doesn't matter, but the idea was:
- Pause the unit.
- Remove the Ability so that when I unpause the order is given but the unit doesn't have the ability.
- Unpause the unit, it tries it's previous order, but doesn't have the ability.
- It get's it's ability back and gets it's level set (I know I didn't have to use an if/then, I just like that practice, but maybe it's not a good idea/ maybe it's slower than just not checking if the added ability was successful)
It does work to cancel/stop casting and seemingly every spell event except channel.
I could simply reimburse the unit's mana, but I grew attached to this concept working at the channeling step in hopes to prevent the mana from being spent in the first place, and also to allow for a Map Editor to set a channeling-time if they so choose.
I know there are other options, but I am concerned that I don't know what are good practices for compatibility, and a lot of the threads I find when I search ended back in 2016 and sometimes (such as with @IcemanBo's suspendunit system) everything looks like it would work great, and then I get to the bottom of the thread and there was some bug that ended the whole effort.
Anyway, in particular I am curious if compatibility is a requirement, a nice thing to do, or simply a matter of preference, because I am sure I can find many ways of getting it done if I assume we are all using the most up-to-date wc3, but my intention is just to make systems to enable makers to make cool stuff and I like to think we would all use the current version, and I don't really want to study ancient wc3 history to do that, but I guess if it's the only way I will...
I know this topic is kind of two-in-one, but to make it simple what I am asking:
- The two questions at the top.
- The snippet I shared (is it a decent way to end a follow through)
- The following question about the best way to stop-short a channel-based spell's channeling.