Jass:TerrainDeformationWaveBJ – Mappedia

Jass:TerrainDeformationWaveBJ

Aus Mappedia
Wechseln zu: Navigation, Suche
Funktion: TerrainDeformationWaveBJ
Parameter: real
location
location
real
real
real
Rückgabewert: terraindeformation
Autor: Blizzard
Quelle: Blizzard.j
Synchron: Unbekannt



Code

function TerrainDeformationWaveBJ takes real duration, location source, location target, real radius, real depth, real trailDelay returns terraindeformation
    local real distance
    local real dirX
    local real dirY
    local real speed

    set distance = DistanceBetweenPoints(source, target)
    if (distance == 0 or duration <= 0) then
        return null
    endif

    set dirX = (GetLocationX(target) - GetLocationX(source)) / distance
    set dirY = (GetLocationY(target) - GetLocationY(source)) / distance
    set speed = distance / duration

    set bj_lastCreatedTerrainDeformation = TerrainDeformWave(GetLocationX(source), GetLocationY(source), dirX, dirY, distance, speed, radius, depth, R2I(trailDelay * 1000), 1)
    return bj_lastCreatedTerrainDeformation
endfunction

Parameter

Typ Name Beschreibung
real duration
location source
location target
real radius
real depth
real trailDelay
Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
Warcraft-Mapping
Werkzeuge