• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Get your art tools and paintbrushes ready and enter Hive's 34th Texturing Contest: Void! Click here to enter!

[General] Remove preplaced Blight on terrain during the game

Level 28
Joined
Feb 2, 2006
Messages
1,651
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:

Uncle

Warcraft Moderator
Level 74
Joined
Aug 10, 2018
Messages
7,945
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:
Level 28
Joined
Feb 2, 2006
Messages
1,651
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?
 
Top