Most likely, you would need to use a few triggers. Basically, give the Permanent Invisibility ability to the caster when shadow meld is used. To prevent the unit from having invisibility while moving, you would need a trigger to detect if the unit has moved.
The easiest way I can think of is to simply use the distance between points check. Here's a simple trigger to help you get the idea of it.
Trigger:
- Shadow Meld Cast
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Shadow Meld
- Actions
- Custom script: call RemoveLocation(udg_TempPoint[0])
- Set TempPoint[0] = (Poisition of (Triggering unit))
- Set TempUnit = (Triggering unit)
- Unit - Add Permanent Invisibility to (Triggering unit)
- Trigger - Turn on Shadow Meld Periodic <gen>
Trigger:
- Shadow Meld Periodic (Initially off)
- Events
- Time - Every 0.10 seconds of game time
- Conditions
- Actions
- Set TempPoint[1] = (Position of TempUnit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Distance between TempPoint[0] and TempPoint[1]) Greater than 0.00
- Then - Actions
- Unit - Remove Permanent Invisibility from TempUnit
- Custom script: call RemoveLocation(udg_TempPoint[0])
- Else - Actions
- Custom script: call RemoveLocation(udg_TempPoint[1])
Though this isn't MUI, you can easily make it MUI just by tweaking the triggers a little bit.
Lol obviously i know it's a shortcut.... What i mean is the unit is not Temp, or if you want Temporary. The unit isn't temporary since you set it once to one specific unit and use periodic trigger with it. If you keep using it over and over, I don't think it should be called "Temporary".Calling a variable Temp, because it is only temporary? A variable is only temporary if you use it, and clear it after you use. A variable is not temporary, if you set it to something, don't clear, and keep using that point over nad over again throughout the game. I still think it's temporary.
Unless.. You're saying it should be spelled Temporary instead of Temp..
It's a shortcut.
Shadow Meld automatically makes the unit invisible again when it stops moving. How do you propose to detect when to make the unit try channeling again (when it stops moving)?make spell based of channel with unlimited (very long - 3600) preparation time.
on cast event - add permanent invis.
on cast end event - remove permanent invis.
Shadow Meld automatically makes the unit invisible again when it stops moving. How do you propose to detect when to make the unit try channeling again (when it stops moving)?
Well, then it isn't really like Shadow Meld, is it?force player to cast spell if he want to hide, its very simple.