Easy question :)

Grags_1977

Ultra Cool Member
Reaction score
32
Hi, I'm trying to add this...

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Terrain type at (Point(x, y))) Equal to Underground - Grey Stones
    • Then - Actions
    • Destructible - Create a Line of Sight Blocker at (Point(x, y)) facing (Random angle) with scale 1.00 and variation 0
    • Else - Actions

To this...
JASS:
function Trig_Build_2_Actions takes nothing returns nothing
local real x = GetRectMinX(gg_rct_Cave_1)
local real y
loop
exitwhen x > GetRectMaxX(gg_rct_Cave_1)
set y = GetRectMinY(gg_rct_Cave_1)
loop
exitwhen y > GetRectMaxY(gg_rct_Cave_1)
HERE!!!!!!
set y = y + 128
endloop
set x = x + 128
endloop
endfunction


I've never tried to learn Jass and know NOTHING about it. But I was unable to find a way to do this in GUI.

Thanks in advance :)
 

Grags_1977

Ultra Cool Member
Reaction score
32
I think i've done it. Took all day!

But this is the result.

JASS:
function Trig_Build_2_Actions takes nothing returns nothing
local real x = GetRectMinX(gg_rct_Cave_1)
local real y
loop
    exitwhen x > GetRectMaxX(gg_rct_Cave_1)
    set y = GetRectMinY(gg_rct_Cave_1)
    loop
        exitwhen y > GetRectMaxY(gg_rct_Cave_1)       
            if ( GetTerrainTypeBJ(Location(x, y)) == 'Ggrs' ) then
                call CreateDestructableLoc( 'YTlb', Location(x, y), GetRandomDirectionDeg(), 1, 0 )
            endif
        set y = y + 128
    endloop
    set x = x + 128
endloop
endfunction


Don't know if it leaks or not. But it's working finally :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top