• 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.

How to reveal a rect/region?

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,338
Hi,

What is the native to reveal a rect/region to the player, e.g. they have vision of that rect/region.

I tried using this call

JASS:
call SetFogStateRect(owner, FOG_OF_WAR_VISIBLE, townArea, true)

But all it did was keep the fog, except reveal that there were buildings under it.
 
Apparently the BJ does this.

JASS:
function CreateFogModifierRectBJ takes boolean enabled, player whichPlayer, fogstate whichFogState, rect r returns fogmodifier
    set bj_lastCreatedFogModifier = CreateFogModifierRect(whichPlayer, whichFogState, r, true, false)
    if enabled then
        call FogModifierStart(bj_lastCreatedFogModifier)
    endif
    return bj_lastCreatedFogModifier
endfunction

Probably FogModifiers have to be started via that call?
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
Ah many thanks. But do I need to destroy the fog modifier as well (store it in a variable then call destroy)? Or does it not leak?
 
Status
Not open for further replies.
Top