It would need an update though since from 1.31.1 onward buffs can stack without needing to trigger this.The beauty of this system is not only that its not just non-dispellable buffs but also capable of creating new buffs that can be stacked and not overwrite vanilla buffs.
Well we don't know what warcraft version he is using. And so far no I have received no bug reports from players using reforged regarding my custom spells/buffs/etc and I feels this system even with some new functionality doesn't really conflicts and causes problems.It would need an update though since from 1.31.1 onward buffs can stack without needing to trigger this.
Hm, I don't that is mui or will work properly since you're using waits. You need an unit indexing system. If you don't want install that, then you can accomplish it too by using custom script. Here an example...actually i found a way to add non dispel buff to unit with shadow strike ability.
you just need to add friend target to targets allowed stats.
Berserk
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Berserk (Orc Warlord)
Actions
-------- Config --------
Set Berserk_level = (Level of Berserk (Orc Warlord) for (Triggering unit))
Set Strength[1] = Item Hero Stat Bonus (+2 Strength)
Set Strength[2] = Item Hero Stat Bonus (+4 Strength)
Set Strength[3] = Item Hero Stat Bonus (+6 Strength)
-------- Positive effect --------
Unit - Add Strength[Berserk_level] to (Triggering unit)
Wait 20.00 seconds
Unit - Remove Strength[Berserk_level] from (Triggering unit)
-------- Negative effect --------
Set Temp_Point = (Position of (Triggering unit))
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
Set Dummy = (Last created unit)
Unit - Add Berserk (Negative) to Dummy
Unit - Order Dummy to Night Elf Warden - Shadow Strike (Triggering unit)
Unit - Add a 0.20 second Generic expiration timer to Dummy
Custom script: call RemoveLocation( udg_Temp_Point )
i test it in my map it's a mui spell, for test i made a simple trigger withHm, I don't that is mui or will work properly since you're using waits. You need an unit indexing system. If you don't want install that, then you can accomplish it too by using custom script. Here an example...
You need to go to object editor, then to view, check display values as raw data. Replace A00O with the rawcode of your Item Hero Stat Bonus. Then you need to copy and paste this trigger two times for lvl2 and lvl3 bonus Item Hero Stat Bonus. Helpful to remember that the rawcode is enclosed by apostrophe like this 'A00O'
Berserk Lvl 1
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Berserk (Orc Warlord)
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
Actions
Custom script: local real duration = 20.00
Custom script: local unit target = GetTriggerUnit()
Custom script: call UnitAddAbility( target, 'A00O')
Custom script: call TriggerSleepAction (duration)
Custom script: call UnitRemoveAbility( target, 'A00O')
Custom script: set target = null
A second opinion would be nice, been wondering why Uncle hasn't posted since he usually a long, informative answer and then realized your thread is in requests instead of world editor help zone. Might be useful to ask mods to transfer the thread so more talented peeps can answer your question.
@Uncle said trigger unit will work even after waits.Hm, I don't that is mui or will work properly since you're using waits. You need an unit indexing system.
I don't think so because during the wait another trigger/event might use the triggering unit event response and overwrite the one in waiting.@Uncle said trigger unit will work even after waits.
yes my bad he said just work with one wait.I don't think so because during the wait another trigger/event might use the triggering unit event response and overwrite the one in waiting.
Could theoretically work with waits if you use arrays and unit custom values in the arrays, so then you don't reference triggering unit or the same variable but instead variable[unit's custom value].yes my bad he said just work with one wait.
(Triggering unit) will not get overwritten, it acts like a local variable.I don't think so because during the wait another trigger/event might use the triggering unit event response and overwrite the one in waiting.
So, the trigger remembers the triggering unit as a unique variable after the wait if another unit starts the ability before the wait finished? So when the wait ends, both triggering units are different units which will trigger the actions separately/properly?(Triggering unit) will not get overwritten, it acts like a local variable.
so my ability is a mui abilty?(Triggering unit) will not get overwritten, it acts like a local variable.
This line isn't MUI:so my ability is a mui abilty?
thanks.This line isn't MUI:
You're referencing a variable after a Wait, that variable can change to some other value during this time.
Unit - Remove Strength[Berserk_level] from (Triggering unit)
If you want to snapshot this level so it remains the same throughout the trigger then do this:
Now it will act like a local variable (with some scope restrictions).
-------- Config --------
Custom script: local integer udg_Berserk_Level
Set Berserk_level = (Level of Berserk (Orc Warlord) for (Triggering unit))
![]()
local udg_
local udg_ Presented by -Kobas- This cool trick can be used in many programming languages and jass is one of them. Shadowing variables, as named, allow us to use global variables created in GUI variable editor as jass local variables in our triggers. This way we can create MUI code really...www.hiveworkshop.com
Keep in mind that Waits are inconsistent and need to be synced when playing online. Not the end of the world but don't be surprised when it doesn't sync up with your Buff since that uses a Timer which is 100% precise. Edit: Also, if you're ability to cast this ability again while it's already running it will break since you'll essentially have two Waits running that are both trying to remove the ability. The first instance will end early and remove the ability for BOTH instances.