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

[Trigger] Terrain type check

Status
Not open for further replies.
Level 11
Joined
Feb 14, 2009
Messages
884
I want to create an ability that grants some bonuses while the hero in within a terrain type (snow, im my case). When the ability is cast, the hero covers an area in snow (Point-blank AoE and similar to blight creation) and gets IAS, MS and evasion. Those bonuses last while he stands in snow (I would like the snow to "melt" after x seconds, resetting the tiles) and disappear if he moves away.

I know that terrain-type checking is doable (eeve! TD, Pyramid escape etc) and so is tile resetting (if you've played "Slide, Ninja, slide", you'll propably know there is a skill called "Thaw". That skill creates a small area of blight - I think - at target point for a few seconds. Once the effect ends, the blighted tiles become snowy again), but I can't think how to implement it.

Last but not least, I would like to know if I can create a weather effect on the area the spell is cast and remove it once the spell duration ends.

A big "thank you", a free /hug and +rep :eekani: to anyone who helps me! :thumbs_up:
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Check Terrain:
  • Conditions
    • (Terrain type at (Your Location) Equal to Lordaeron Winter/Northrend/Icecrown Glacier - Snow
Tile Resetting (NON MUI/MPI):
  • Actions
    • Set Point = (Your Location)
    • Set TerrainType = (Terrain type at Point)
    • Environment - Change terrain type at Point to Lordaeron Winter/Northrend/Icecrown Glacier - Snow using variation -1 in an area of size 1 and shape Circle
    • Wait X seconds
    • Environment - Change terrain type at Point to TerrainType using variation -1 in an area of size 1 and shape Circle
    • Custom script: call RemoveLocation(udg_Point)
To cover a bigger area you need to make the variable "TerrainType" an array variable and make it store the terrain type of more locations.

Weather Effect (NON MUI/MPI):
  • Actions
    • Set Point = (Your Location)
    • Set Area = (Region centered at Point with size (WIDTH, HEIGHT))
    • Environment - Create at Area the weather effect (Some Effect)
    • Set WeatherEffect = (Last created weather effect)
    • Wait X seconds
    • Environment - Remove WeatherEffect
    • Custom script: call RemoveLocation(udg_Point)
    • Custom script: call RemoveRect(udg_Area)
 
Status
Not open for further replies.
Top