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

Frozen ground for limited time

Status
Not open for further replies.
Level 13
Joined
Jan 2, 2016
Messages
973
Perhaps the answer to my question is quite simple, but I haven't worked with tiles trough the trigger editor, so I need to ask here:
How can I temporarily change the tiles in an area to be icy, and then return them to normal after a set amount of time?
 
Level 39
Joined
Feb 27, 2007
Messages
5,031
JASS:
native GetTerrainType takes real x, real y returns integer
native GetTerrainVariance takes real x, real y returns integer
native SetTerrainType takes real x, real y, integer terrainType, integer variation, integer area, integer shape returns nothing
Run some tests to figure out what parameters make icy terrain using Set. Store all previous terrain type and variation for each 32x32 square in a struct or something, set them to be icy, then return them to their original settings afterward.
 
Level 15
Joined
Sep 6, 2015
Messages
576
You could do it via the Environment - Change Terrain Type, but then if you want to return the old tiling back after, it would be hard, so I think the best way is to flatten and extend a Crystal doodad, or some other doodad, like icy rocks or something, so it looks like ice or snow on the ground, and then make it walkable. Then you add it to a region when you want, and remove it after. Note, though, that it must be a destructible, and not a doodad if you want to add it or remove it from the map.
 

Deleted member 219079

D

Deleted member 219079

I think IcemanBo has a library, if not multiple, that covers this. Look up the JASS section.
 
Level 8
Joined
Jan 28, 2016
Messages
486
And what would be the best way to get the tiles in a circular area?

There's a GUI action under Environment section that does this. By the way, using a variation of -1 generates random variations within the area.

  • Frozen Ground
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frozen Ground
    • Actions
      • Environment - Change terrain type at (Center of (Playable map area)) to Lordaeron Summer - Dirt using variation -1 in an area of size 512 and shape Circle
 
Level 39
Joined
Feb 27, 2007
Messages
5,031
Every tile is 128*128 units... Also terrain type is defined per vertex with tiles being the result of mixing 4 vertices, with one of them dominating most of the results (upper left?).
Right, still remembering things. That sounds like a horrible way to determine the terrain for a tile since, you know, different variations/textures can't be mathematically blended. What is the purpose of doing it this way?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
That sounds like a horrible way to determine the terrain for a tile since, you know, different variations/textures can't be mathematically blended. What is the purpose of doing it this way?
Terrain type and variation are attributes of the terrain vertex. If you want to know why you will need to ask Blizzard and the developers who made the game.
 
Status
Not open for further replies.
Top