[General] Remove preplaced Blight on terrain during the game

Level 29
Joined
Feb 2, 2006
Messages
1,691
I would like to remove the preplaced Blight on terrain using the native
JASS:
native SetBlightRect takes player whichPlayer, rect r, boolean addBlight returns nothing
. However, it does not seem to work. I have tried some owners and null as the player parameter. Who is the owner of preplaced Blight? How can it be removed it at a certain point in the game?
 
Last edited:
I would like to remove the preplaced Blight on terrain using the native
JASS:
SetBlightRect
. However, it does not seem to work. I have tried some owners and null as the player parameter. Who is the owner of preplaced Blight? How can it be removed it at a certain point in the game?
I would assume it's owned by Player 1 (Red) or Neutral Passive / another Neutral player.

Edit: Tests show it doesn't matter which Player you specify when using either SetBlightRect() or SetBlightRectBJ(). Preplaced Blight must be a special exception when these run, ignoring the Player check.
 
Last edited:
I would assume it's owned by Player 1 (Red) or Neutral Passive / another Neutral player.

Edit: Tests show it doesn't matter which Player you specify when using either SetBlightRect() or SetBlightRectBJ(). Preplaced Blight must be a special exception when these run, ignoring the Player check.
So these calls should actually remove it?

JASS:
call SetBlightRect(null, gg_rct_Zone_Sunwell_Grove, false)
call SetBlightRect(Player(PLAYER_NEUTRAL_PASSIVE), gg_rct_Zone_Sunwell_Grove, false)

Because it seems to stay there.

I instantly change the terrain types afterwards:

JASS:
call SetTerrainType(x, y, target, GetTerrainVariance(x, y), 1, 0)

Maybe this is an issue?
 
Back
Top