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

[Trigger] How would i make one tile change to another via environment trigger

Status
Not open for further replies.
Level 1
Joined
Aug 25, 2009
Messages
4
  • Heavy Snow
    • Events
      • Player - Player 1 (Red) types a chat message containing -hsnow as An exact match
    • Conditions
    • Actions
      • Environment - Create at (Playable map area) the weather effect Northrend Snow (Heavy)
      • Environment - Set sky to Lordaeron Winter Sky
      • Environment - Turn (Last created weather effect) On

I want to know how i can make one certain title variable "Dalaran Grass Trim" turn into "Icecrown Ice" Does anyone know how to perform this trigger?

For instance how would i convert a terrain variable to a region variable.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Well I created this script to make things easier. It changes all tiles in playable map area of type x to type y.

Temp_Loc_1 should be a region at the lower left corner of your play area. Position exactly like this, so it's at the center of a tile. Setting a tile there helps to center it.

help_2.jpg


  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Set Temp_Real_3 = 128.00
      • Set Temp_Real_1 = (((Abs((Min X of (Playable map area)))) - Temp_Real_3) + ((Abs((Max X of (Playable map area)))) - Temp_Real_3))
      • Set Temp_Real_2 = (((Abs((Min Y of (Playable map area)))) - Temp_Real_3) + ((Abs((Max Y of (Playable map area)))) - Temp_Real_3))
      • Set Temp_Integer_1 = ((Integer(Temp_Real_1)) / 128)
      • Set Temp_Integer_2 = ((Integer(Temp_Real_2)) / 128)
      • Set Temp_Loc_1 = (Center of Region 001 <gen>)
      • For each (Integer A) from -1 to (Temp_Integer_1 + 1), do (Actions)
        • Loop - Actions
          • For each (Integer B) from -1 to (Temp_Integer_2 + 1), do (Actions)
            • Loop - Actions
              • Set Temp_Loc_2 = (Temp_Loc_1 offset by ((Real(((Integer A) x 128))), (Real((128 x (Integer B))))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Terrain type at Temp_Loc_2) Equal to Lordaeron Summer - Dirt
                • Then - Actions
                  • Environment - Change terrain type at Temp_Loc_2 to Icecrown Glacier - Ice using variation -1 in an area of size 1 and shape Square
                • Else - Actions
              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
EDIT: This seems to bug with some map sizes. I'll try to fix it.
 
Last edited:
Status
Not open for further replies.
Top