• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Blight on unbuildable ground

Status
Not open for further replies.
Level 12
Joined
May 22, 2015
Messages
1,051
Is it possible to have blight go onto unbuildable terrain tiles? I don't have regular buildings in my map, so if there is an easy way to allow building on tiles you normally can't build on, that could work as well.
 

EdgeOfChaos

E

EdgeOfChaos

I'm not at my computer at the moment, but I believe there are options in NGWE to change buildable/unbuildable of tiles. I'm not sure if this will fix the blight thing.

There should be also a "Building Requirement" with the field "Buildable" checked. If you uncheck that field, it will allow that one building to be constructed on unbuildable terrain.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
I think the tiles themselves do not contain any pathing information. Instead the editor uses a table to determine what pathing to paint on the pathing map above tiles. As such you could try modifying the pathing map directly such that directly above the unbuildable tiles is buildable.

The blight mechanic might be different however and have nothing to do with build-ability. It might be that a table is used to check if a tile can be blighted or not irrelevant of the pathing above it.
 
Level 12
Joined
May 22, 2015
Messages
1,051
All my blight is triggered, lol. My map is a hero defense where you help defend a castle. I think the blight looks really cool against the caster tiles, but I can't just put the blight easily. Right now, it is turning the tile into dirt and then blighting it. If it tries to do it on the same tile, it turns it into dirt but doesn't blight it again. I'm not sure if changing the tile changes whether it is blighted or not.

It would just be really handy if I could put blight over it without doing anything super crazy. It's not really necessary for my map, it just looks cool if the castle sort of gets ruined / blighted while it gets invaded.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
I tried to fix it, but didn't exactly succeed.

JASS:
function fix takes boolean addBlight, player whichPlayer, rect r returns nothing
	local real x = GetRectMinX(r)
	local real y = GetRectMinY(r)
	loop
		loop
			call SetTerrainTypeBJ(Location(x,y), 'Ldrt', -1, 1, 0 )
			exitwhen y > GetRectMaxY(r)
			set y = y + 32
		endloop
		exitwhen x > GetRectMaxX(r)
		set y = GetRectMinY(r)
		set x = x + 32
	endloop
endfunction

hook SetBlightRectBJ fix

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Environment - Create Blight for Player 1 (Red) across Region 000 <gen>
 
Status
Not open for further replies.
Top