I finaly found a nice MUI solution for this with just a addition of 1 line of code (using a local of course...).
Im really proud of myself since im a really idiot concerning JASS (and maybe other things

) so you can all screw yourselves and think whatever you want... quietly
The basic triggers go like this
-
Untitled Trigger 001
-

Events
-


Unit - A unit Starts the effect of an ability
-

Conditions
-

Actions
-


Unit - Set the custom value of (Target unit of ability being cast) to 1
-


Wait 5.00 seconds
-


Unit - Set the custom value of (Target unit of ability being cast) to 0
-
Untitled Trigger 002
-

Events
-

Conditions
-


(Custom value of (Triggering unit)) Equal to 1
-

Actions
-


Unit - Create 5 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
As you can see, the problem is the "wait 5 seconds".
If another unit casts your spell beetwin those 5 seconds, the first unit's custom value won't change back to 0.
So, I simply changed the trigger to custom script and now it looks like this
Code:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
call SetUnitUserData( GetSpellTargetUnit(), 1 )
call TriggerSleepAction( 5.00 )
call SetUnitUserData( GetSpellTargetUnit(), 0 )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
If you would really look at what it does you'll pretty much already undertsand what to do, but anyway, here is the solution using a local
Code:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
[COLOR="Red"]local unit u = GetSpellTargetUnit()[/COLOR]
call SetUnitUserData( [COLOR="red"]u[/COLOR], 1 )
call TriggerSleepAction( 5.00 )
call SetUnitUserData( [COLOR="red"]u[/COLOR], 0 )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
The red letters are the changes.
I guess this will easly solve all this kind of spells for GUI users easly (since I saw about 5 of them this week)
