CreateFogModifierRadiusLoc
- Parameters
-
forWhichPlayer player
whichState fogstate
Determines what type of fog the area is being modified to. See
fogstate
for type explanation.center location
The location where the fog modifier begins.
radius real
Determines the extent that the fog travels (expanding from the location
center
).useSharedVision boolean
Apply modifier to target's allied players with shared vision?
afterUnits boolean
Will 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 circular radius for a specific player.
A fog modifier is disabled by default, use
FogModifierStart
to 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_FOGGED
orFOG_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.SetFogStateRect
after fog modifier creation.- note
Moving the location with
MoveLocation
will effectively move the fog modifier. No restart of the fog modifier (FogModifierStart
) is necessary. When the location is destroyed (RemoveLocation
), the fog modifier will remain at the last position. Since the fog modifier manages a reference to the location, the handle id of the location won't be released until the fog modifier is fully released as well.- patch
1.00
- Source
- common.j
- return type
fogmodifier
- Source code
native CreateFogModifierRadiusLoc takes player forWhichPlayer, fogstate whichState, location center, real radius, boolean useSharedVision, boolean afterUnits returns fogmodifier