Cokemonkey11
Spell Reviewer
- Joined
- May 9, 2006
- Messages
- 3,575
However it presents to syntax errors, so there must be something wrong with my (ordering?)
thanks for any help.
JASS:
globals
integer intTerrainTime
rect mapBounds
integer array mapType
timer time
endglobals
function periodic takes nothing returns nothing
local integer exit = 0
set mapBounds = Rect(GetCameraBoundMinX(), GetCameraBoundMinY(), GetCameraBoundMaxX(), GetCameraBoundMaxY())
loop
exitwhen exit > 17
call SetTerrainTypeBJ(GetRandomLocInRect(mapBounds),mapType[GetRandomInt(1,7)],-1,GetRandomInt(1,2),0)
set exit = exit + 1
endloop
endfunction
function createPeriodicTrigger takes nothing returns nothing
set time = CreateTimer()
call TimerStart(time,.05,true,function periodic)
endfunction
function Trig_pointTenSecs_Actions takes nothing returns nothing
local location centerPlayable = Location(GetRectCenterX(bj_mapInitialPlayableArea),GetRectCenterY(bj_mapInitialPlayableArea))
set mapType[1] = 'Ldro'
set mapType[2] = 'Ldrg'
set mapType[3] = 'Lgrs'
set mapType[4] = 'Lgrd'
set mapType[5] = 'Agrd'
set mapType[6] = 'Lgrs'
set mapType[7] = 'Ldro'
call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\White_mask.blp")
call SetCineFilterBlendMode(BLEND_MODE_BLEND)
call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
call SetCineFilterStartUV(0,0,1,1)
call SetCineFilterEndUV(0,0,1,1)
call SetCineFilterStartColor(PercentToInt(0,255),PercentToInt(0,255),PercentToInt(0,255),PercentToInt(100,255))
call SetCineFilterEndColor(PercentToInt(0,255),PercentToInt(0,255),PercentToInt(0,255),PercentToInt(100,255))
call SetCineFilterDuration(0)
call DisplayCineFilter(true)
set intTerrainTime = 1
call createPeriodicTrigger()
call TriggerSleepAction(5)
call DestroyTimer(time)
call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\White_mask.blp")
call SetCineFilterBlendMode(BLEND_MODE_BLEND)
call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
call SetCineFilterStartUV(0,0,1,1)
call SetCineFilterEndUV(0,0,1,1)
call SetCineFilterStartColor(PercentTo255(0),PercentTo255(0),PercentTo255(0),PercentTo255(0))
call SetCineFilterEndColor(PercentTo255(0),PercentTo255(0),PercentTo255(0),PercentTo255(0))
call SetCineFilterDuration(5)
call DisplayCineFilter(true)
call CreateUnit(Player(0),'hfoo',0,0,270)
endfunction
function InitTrig_pointTenSecs takes nothing returns nothing
set gg_trg_pointTenSecs = CreateTrigger()
call TriggerRegisterTimerEvent(gg_trg_pointTenSecs,.1,false)
call TriggerAddAction(gg_trg_pointTenSecs,function Trig_pointTenSecs_Actions)
endfunction
thanks for any help.