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

Terrain lowering

Status
Not open for further replies.
Level 14
Joined
May 22, 2010
Messages
362
Is it possible to lower terrain when lets say an ability is cast and return it back to the way it was when another ability is cast, without any leaks?
The duration if the change in the terrain is permanent as long as the second ability is not cast.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Nope. all game terrain changes leak.

Theoretically they dont leak because they HAVE to be in the memory in order for the game to know that theres a terrain change, but if you do an inverse operation (e.g. lowering 60 after raising 60) it will register both (where the leak comes in) rather than cancelling them out
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
It should be possible as terrain deformations can be added and removed (can they? maybe stopped only) as objects.
If this is leak-less is another question as many object types leak no mater what (string, widget etc).

The problem is that any kind of terrain deformation is not a safe thing to do as the deformation results are asynchronous and so can cause clients to fall out of synchronization.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
It should be possible as terrain deformations can be added and removed (can they? maybe stopped only) as objects.
If this is leak-less is another question as many object types leak no mater what (string, widget etc).

The problem is that any kind of terrain deformation is not a safe thing to do as the deformation results are asynchronous and so can cause clients to fall out of synchronization.

JASS:
RemoveTerrainDeformation
TerrainDeformationRemove
DestroyTerrainDeformation
TerrainDeformationDestroy
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
JASS:
RemoveTerrainDeformation
TerrainDeformationRemove
DestroyTerrainDeformation
TerrainDeformationDestroy

Are you collecting possible names for a function Blizzard could have implemented?

There is only

native TerrainDeformStop takes terraindeformation deformation, integer duration returns nothing

and

native TerrainDeformStopAll takes nothing returns nothing

Both abort the specific/any unfinished (!) deformation but do not release the handle id. I think the leak is limited to that and thus very minor or even non-existant if it's just a counter and if non-running deformations are not listed.
 
Level 14
Joined
May 22, 2010
Messages
362
So it can't be done? I am asking because I had an idea for a model of a building that is built around a big hole (demonic pit citadel of corruption), so the terrain has to get lowered when the building is built/starts to be built and naturally the terrain has to return to normal once the building is destroyed/canceled, I am asking because I don't want to waste time making the model if the trigger for the terrain can't be done, or is leaky.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
So it can't be done? I am asking because I had an idea for a model of a building that is built around a big hole (demonic pit citadel of corruption), so the terrain has to get lowered when the building is built/starts to be built and naturally the terrain has to return to normal once the building is destroyed/canceled, I am asking because I don't want to waste time making the model if the trigger for the terrain can't be done, or is leaky.

It wouldn't be that big of an issue if you used terrain deformations, two deformations for every building of type built isn't that bad.
 
Status
Not open for further replies.
Top