- Joined
- Jan 13, 2019
- Messages
- 284
Hello, if you want to know what is alpha tile go to here:
Alpha Tile for Dummies
This tutorial is a solution to the problem of alpha tile use:
Create a map initialization triggers with
When adding tiles place the Alpha tile in second position
3) If you want solve the minimap issue you can do this:
Select a dummy tile for coloring the minimap (snow in this time)
Travel across the map changing every dummy tile with our alpha tile
3.5) If you want find the code of a tile:
place that tile in the center of the map (where the tree is) and use chat command "findcode" later change this value with dummy_tile_type variable with the obtained value.
NOTE:
1. "Masked Areas Are Partially Visible" can be checked or unchecked (Map Properties)
2. Alpha Tile Felwood Poison
3. Dummy Tile Snow
RESULTS:
See the attachment map to make test.
Commands:
Alpha Tile for Dummies
This tutorial is a solution to the problem of alpha tile use:
- It looses transparency in fog of war and black mask
- It looses transparency if it is the bottom tile as mentioned in the overlapping part above.
- It is white or black on the minimap
Create a map initialization triggers with
-
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Black mask across (Playable map area)
When adding tiles place the Alpha tile in second position
3) If you want solve the minimap issue you can do this:
Select a dummy tile for coloring the minimap (snow in this time)
Travel across the map changing every dummy tile with our alpha tile
JASS:
function Trig_Swap_Func007Func001Func003C takes nothing returns boolean
if ( not ( udg_TEMP_TILE_TYPE == udg_DUMMY_TILE_TYPE ) ) then
return false
endif
return true
endfunction
function Trig_Swap_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_018" )
set udg_min_x = GetRectMinX(GetEntireMapRect()) / 128
set udg_min_y = GetRectMinY(GetEntireMapRect()) / 128
set udg_max_x = GetRectMaxX(GetEntireMapRect()) / 128
set udg_max_y = GetRectMaxY(GetEntireMapRect()) / 128
set bj_forLoopAIndex = R2I(udg_min_x)
set bj_forLoopAIndexEnd = R2I(udg_max_x)
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set bj_forLoopBIndex = R2I(udg_min_y)
set bj_forLoopBIndexEnd = R2I(udg_max_y)
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
set udg_TEMP_TILE_POS = Location(I2R(( GetForLoopIndexA() * 128 )), I2R(( GetForLoopIndexB() * 128 )))
set udg_TEMP_TILE_TYPE = GetTerrainType(GetLocationX(udg_TEMP_TILE_POS), GetLocationY(udg_TEMP_TILE_POS))
if ( Trig_Swap_Func007Func001Func003C() ) then
call SetTerrainTypeBJ(udg_TEMP_TILE_POS, udg_ALPHA_TILE_TYPE, -1, 1, 1)
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Swap takes nothing returns nothing
set gg_trg_Swap = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Swap, Player(0), "swap", true )
call TriggerAddAction( gg_trg_Swap, function Trig_Swap_Actions )
endfunction
3.5) If you want find the code of a tile:
place that tile in the center of the map (where the tree is) and use chat command "findcode" later change this value with dummy_tile_type variable with the obtained value.
NOTE:
1. "Masked Areas Are Partially Visible" can be checked or unchecked (Map Properties)
2. Alpha Tile Felwood Poison
3. Dummy Tile Snow
RESULTS:
See the attachment map to make test.
Commands:
- fogon
- fogoff
- blackon
- blackoff
- swap
- findcode
Attachments
Last edited:









