• 🏆 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!

I used SetTerrainType and the terrain (almost) always looks black

Level 24
Joined
Jun 26, 2020
Messages
1,853
Hello, I'm trying changing the terrain of a place in my map and for some reason every tile type that I used (except Ashenvale - Grassy Dirt) the terrain appears black and I don't know why, the only thing I could think that it has to do that in my map I'm using custom tile types, but they should still appear and not being just black like the Outland void, do you know what is going on?
 
Level 24
Joined
Jun 26, 2020
Messages
1,853
Something funny is if I asing the value of the tile type in the variable directly, happens this issue, but if I assign the variable using "Terrain type of <Some location in the map>" I don't get this issue and the terrain is correctly asingned.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
It is my understanding that the WC3 engine only supports 16 loaded tile types per session. Once a tile type is loaded, such as being referenced by the w3e file or by trigger setting terrain to a new tile type, it cannot be unloaded. In this case attempting to load any additional tile types results in an already loaded tile type being used instead in a seemingly random way.

Something funny is if I asing the value of the tile type in the variable directly, happens this issue, but if I assign the variable using "Terrain type of <Some location in the map>" I don't get this issue and the terrain is correctly asingned.
Possibly the GUI is not using or assigning the correct constant values to the variable. The dynamic approach works because it looks up the correct value to use.
 
Top