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

[Solved] Terrain deformation API help

Level 3
Joined
Nov 11, 2021
Messages
28
I' appreciate tutorial/guide for terrain deformation API as the arguments seems complex to fiddle with?
JASS:
// Arguments seems apparent
native TerrainDeformCrater          takes real x, real y, real radius, real depth, integer duration, boolean permanent returns terraindeformation
// What is count/spaceWaves/timeWaves/radiusStartPct/limitNeg?
native TerrainDeformRipple          takes real x, real y, real radius, real depth, integer duration, integer count, real spaceWaves, real timeWaves, real radiusStartPct, boolean limitNeg returns terraindeformation
// What is dirX/dirY/trailTime/count?
native TerrainDeformWave            takes real x, real y, real dirX, real dirY, real distance, real speed, real radius, real depth, integer trailTime, integer count returns terraindeformation
// What is updateInterval?
// I expected at least two params, e.g. delta update interval/height update rate.
native TerrainDeformRandom          takes real x, real y, real radius, real minDelta, real maxDelta, integer duration, integer updateInterval returns terraindeformation
// What is duration for?
native TerrainDeformStop            takes terraindeformation deformation, integer duration returns nothing
  • What is the stock spell (as demo) for Ripple and Random (maybe Earthquake is Random)? Which one does Volcano use (nor none of above)?
  • I would like the know set of parameters to simulate stock spell effect (as example).
  • What is the point for TerrainDeformStop()? Stop the effect earlier?
  • terraindeformation does not seem to have a "free" API, so it is auto managed, or TerrainDeformStop must be invoked?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
I feel like you could figure this out yourself in a few minutes of testing.

But you should look at the GUI versions of these functions since those will have more understandable explanations:
1692834949756.png
 
Level 3
Joined
Nov 11, 2021
Messages
28
I feel like you could figure this out yourself in a few minutes of testing.
But you should look at the GUI versions of these functions since those will have more understandable explanations:
Thanks a lot, I forgot about GUI/blizzard.j.

On the other hand, the parameters seem hard to tweak.
  • TerrainDeformCrate/TerrainDeformWave seem to have low cap of change rate.
    TerrainDeformCrate can takes time>duration to reach input depth.
    TerrainDeformWave simply cannot reach input height, and actual depth are effective constant given a fixed speed.
  • TerrainDeformRipple can handle larger depth, albeit may looks ugly.
  • TerrainDeformRandom seems to update at fixed step and always looks ridiculous.
 
Top