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

How To Destroy Terrain-Type

Status
Not open for further replies.
You don't have to destroy a terrain type. ( Actually, no type like that exists =P )

Terrain types are retrieved as integers, and represent the rawcode ID 'XXXX' of the terrain.

Anyway, could you rephrase your question a bit? Are you trying to get what the original terrain type was, or are you making some temporary change to the terrain, or what? =\
 
Level 6
Joined
Oct 10, 2009
Messages
1,425
You don't have to destroy a terrain type. ( Actually, no type like that exists =P )

Terrain types are retrieved as integers, and represent the rawcode ID 'XXXX' of the terrain.

Anyway, could you rephrase your question a bit? Are you trying to get what the original terrain type was, or are you making some temporary change to the terrain, or what? =\

well what im doing is I've got variable Terrain1 and i set it to snow. but later in the game i want to save Terrain1 as lava. but i cant just save the lava over the snow. i need to either destroy it, or as you pointed out, i suppose i need to change it. can you give me a demonstration on how to change it (im not good with jass)
 
Last edited:
"Terrain Types" in GUI are not really variables. They are integers. They are denoted by two single quotes ' ', and inside them are 4 characters (a-z or 0-9). They form a rawcode (just like the ones in the object editor)

For example, "Lordaeron Summer - Grassy Dirt" is represented by 'Ldrg'. Since these variables are just integers, you don't need to worry about them leaking. You can safely overwrite the variable without having to "destroy" the previous terrain type.

Basically:
  • Set TerrainTypeVariable = Lordaeron Summer - Grass Dirt
  • //do a lot of actions
  • Set TerrainTypeVariable = Northrend - Snow
That won't leak.
 
Level 6
Joined
Oct 10, 2009
Messages
1,425
"Terrain Types" in GUI are not really variables. They are integers. They are denoted by two single quotes ' ', and inside them are 4 characters (a-z or 0-9). They form a rawcode (just like the ones in the object editor)

For example, "Lordaeron Summer - Grassy Dirt" is represented by 'Ldrg'. Since these variables are just integers, you don't need to worry about them leaking. You can safely overwrite the variable without having to "destroy" the previous terrain type.

Basically:
  • Set TerrainTypeVariable = Lordaeron Summer - Grass Dirt
  • //do a lot of actions
  • Set TerrainTypeVariable = Northrend - Snow
That won't leak.

Thank you. +rep

Edit: just saw your post cokemonkey, and yes i could do that also. so thanks for a helpful suggestion :thumbs_up:
 
Status
Not open for further replies.
Top