HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Terrain Trigger

10-22-2008, 12:19 AM#1
war444
Can somone tell me the trigger where when like somone enters a region, a terrain appears on the path

Example: a person steps on a regoin, and i change a size 1 terrain(grass) to size 1 terrain(snow).

Thanks!
10-22-2008, 01:46 AM#2
Zandose
Trigger:
Untitled Trigger 002
Collapse Events
Time - Elapsed game time is 0.10 seconds
Collapse Conditions
(Terrain type at (Position of (Triggering unit))) Equal to Lordaeron Winter - Dirt
Collapse Actions
Environment - Change terrain type at (Position of (Triggering unit)) to Lordaeron Winter - Snow using variation -1 in an area of size 1 and shape Circle
or
Collapse JASS:
scope TerrainChange

private function Conditions takes nothing returns boolean
    return GetTerrainType(GetUnitX(GetTriggerUnit()), GetUnitX(GetTriggerUnit()))  == 'Wdrt'
endfunction

private function Actions takes nothing returns nothing
    call SetTerrainType(GetUnitX(GetTriggerUnit()), GetUnitX(GetTriggerUnit()), 'Wsnw', -1, 1, 1)
endfunction

private function InitTrig takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterTimerEvent(t, 0.10, true)
    call TriggerAddCondition(t, Condition( function Conditions ) )
    call TriggerAddAction(t, function Actions )
endfunction

endscope
10-23-2008, 12:47 AM#3
war444
Ty, and im making a maze, and i need to know the trigger where the bomber guy bombs a certain regoin AND NOTHING ELSE?

Thanks,