• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

AOE dummy spell that's limited by fog of war?

Status
Not open for further replies.
Level 12
Joined
May 9, 2009
Messages
735
Hello, I want to find a spell that can be used as a dummy which is limited to casting based on area visibility.

I have a building which can cast the infernal ability (giant rock falls from sky and creates fire golem - like default dreadlord level 6). However, since this ability can be cast anywhere on the map I want there to be a limitation in regards to the visibility of the map. So like you need to see the area with a unit before you are allowed to cast there. Are there any abilities that I can use as a dummy? Or maybe there are some options in the channel ability? I couldn't find any options ticking something like "usable on invisible areas" though :S
 
Level 12
Joined
May 9, 2009
Messages
735
I was hoping for an ability because it would fit in smoothly with the warcraft message system. Like when try to cast an ability on something and it makes this sound and gives a message "can't cast on this because bla bla bla". Using triggers to solve this just doesn't seem right...

I solved the issue at the moment by changing the ways the infernals drop. You can no longer select where they fall instead it pick a random enemy and drops on them.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Use SimError;
JASS:
library SimError initializer init
//**************************************************************************************************
//*
//*  SimError
//*
//*     Mimic an interface error message
//*       call SimError(ForPlayer, msg)
//*         ForPlayer : The player to show the error
//*         msg       : The error
//*    
//*     To implement this function, copy this trigger and paste it in your map.
//* Unless of course you are actually reading the library from wc3c's scripts section, then just
//* paste the contents into some custom text trigger in your map.
//*
//**************************************************************************************************

//==================================================================================================
    globals
        private sound error
    endglobals
    //====================================================================================================

    function SimError takes player ForPlayer, string msg returns nothing
        set msg="\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cffffcc00"+msg+"|r"
        if (GetLocalPlayer() == ForPlayer) then
            call ClearTextMessages()
            call DisplayTimedTextToPlayer( ForPlayer, 0.52, 0.96, 2.00, msg )
            call StartSound( error )
        endif
    endfunction

    private function init takes nothing returns nothing
         set error=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
         //call StartSound( error ) //apparently the bug in which you play a sound for the first time
                                    //and it doesn't work is not there anymore in patch 1.22
    endfunction

endlibrary

This will simulate the "error message" like the Blizzard warcraft engine.
 
Status
Not open for further replies.
Top