CreateFogModifierRect
- Parameters
forWhichPlayer playerwhichState fogstateDetermines what type of fog the area is being modified to. See
fogstatefor type explanation.where rectThe rect where the fog is.
useSharedVision booleanApply modifier to target's allied players with shared vision?
afterUnits booleanWill determine whether or not units in that area will be masked by the fog. If it is set to true and the fogstate is masked, it will hide all the units in the fog modifier's radius and mask the area. If set to false, it will only mask the areas that are not visible to the units.
- comment
Creates an object that overrides the fog in a rect for a specific player.
A fog modifier is disabled by default, use
FogModifierStartto enable.This creates a new object with a handle and must be removed to avoid leaks:
DestroyFogModifier.- bug
(v1.32.10) Just by creating a modifier of type
FOG_OF_WAR_FOGGEDorFOG_OF_WAR_VISIBLE, this will modify the player's global fog state before it is enabled. "VISIBLE" will instantly become "FOGGED" and "FOGGED" will cause unexplored areas to become explored. You can workaround this by using e.g.SetFogStateRectafter fog modifier creation.- patch
1.00
- Source
- common.j (suggest an edit or discuss on Github)
- return type
fogmodifier- Source code
native CreateFogModifierRect takes player forWhichPlayer, fogstate whichState, rect where, boolean useSharedVision, boolean afterUnits returns fogmodifier