| 09-09-2007, 01:04 AM | #1 |
Is there a way to make spells have a minimum cast range that will stop the unit and give an error message as if it is non-triggered. I'm referring to the message that happen when you try to cast a unit-target spell on a point. an example is the rattlecage in AoTZ whose iceblock ability must be cast a minimum range from the caster. If not, does anyone know any point target spells with a minimum cast range that can be dummied up? (no stun, removeable effects and targeting, etc.) Thanks ahead of time. |
| 09-09-2007, 01:06 AM | #2 |
This is where you CAN use 'When unit starts casting an ability' rather than 'Starts the effect of an ability'. Just order the unit to stop, make the sound and display the message. |
| 09-09-2007, 02:16 AM | #3 |
how do I display the message so it doesn't say it in the chat window, but looks like a bona-fide blizz error message. |
| 09-09-2007, 03:07 AM | #4 |
Taken from Vex's CS. JASS:// Mimic an interface error message // ForPlayer : The player to show the error // msg : The error // function CS_Error takes player ForPlayer, string msg returns nothing local sound error=CreateSoundFromLabel( "InterfaceError",false,false,false,10,10) if (GetLocalPlayer() == ForPlayer) then if (msg!="") and (msg!=null) then call ClearTextMessages() call DisplayTimedTextToPlayer( ForPlayer, 0.52, -1.00, 2.00, "|cffffcc00"+msg+"|r" ) endif call StartSound( error ) endif call KillSoundWhenDone( error) set error=null endfunction |
| 09-09-2007, 01:08 PM | #5 |
Thanks, that's what I needed. |
