waits make most things non MUI but not everything ...
and triggering unit IS MUI
test it yourself
Events - Units casts spell y
Actions - Wait 10. seconds and then display unit name of triggering unit
will always work properly no matter how often u cast it ....
your trigger will be running multiple times, if you add the same event for the same unit multiple times.
meaning
the actions would appear multiple times on the same unit
to prevent it, add the unit to a group and check if its already in it when adding the event.
0 means forever in most cases for buffs
you can try a trigger like this:
Events - Unit is issued an order with point target
Conditions - Issued Order equal to move/smart/attack - move ....
- Unit has buff invis
Actions - Remove buff invis from triggering unit
use a timer ....
Events - Time every 0.5 sec
Actions -
- set TempGroup = Units of Type XY //whatever units you want here, could bed declared in another trigger as well
- Unit group - pick all units in TempGroup
- set TempLoc = Position of picked unit
- Destructible - Pick every...
Events - unit is issued an order
Conditions - Issued Order = Order Blink
Actions -
- set TempLoc = Target Point of issued order
- If TempLoc is in Rect BLABLA then //<-- or for multiple regions
- Issue triggering unit to stop
- Display error message
- Custom script: call...
use variables^^
non MUI:
Events
Unit - Unit Is attacked
Actions
Set TempLoc = (Random point in Region 184 <gen>)
Special Effect - Create a special Effect at TempLoc using (spell Effect)
Special Effect - Destroy (last created Effect)
Wait 3.00 seconds
Special...
ever heard of the word receycling? :D
you should reuse arrays of removed units, instead of creating new ones for them then you wont have any problem. (8192 units and your map is doomed to be unplayable ;))
both of them leak unless you remove them like this:
Set Force = (All players matching ((Owner of (Triggering unit)) Equal to (Matching player)))
Game - Display to Force the text:
Custom script: call DestroyForce(udg_Force)
set points8p1Engineer_habstation = .....
Unit - Move (Triggering unit)...
'Hblm'
change to
'H008'
also clean the group leaks!
a little bit cleaner:
function Trig_Slide_Actions takes nothing returns nothing
local group g1
local location p
local location p2
local unit u
local integer i = 0
loop
exitwhen i > 11
set g1 =...
Unit - Change ownership of (Last created unit) to (Player((Custom value of (Item being manipulated)))) and Change color
this should only crash if the Custom value is a Player that doesnt exist in GUI like 0.
so somehow the Custom value probably returns 0, but i dont now why yet^^
add a message...