inuit57 / ITB_WeaponLab

인투더브리치 모드_무기 실험용
0 stars 0 forks source link

Hook 발사 - p1이 아닌 다른 곳에서 #1

Open inuit57 opened 3 years ago

inuit57 commented 3 years ago

원하는 것은 Hook이 발사되는 애니메이션이 다른 곳에서도 발동되도록 하는 것인데

투사체를 발사하는 것은 p1이 언제나 기준점으로 작용하고 있습니다. 이를 해결할만한 좋은 방법이 없을련지 좀 고민을 해봐야할 것 같네요.

어쩌면 Goo의 죽음의 메아리로 분열되어서 튀어나가는 것이 힌트가 될 수도 있습니다.


그 밖에 사소한 문제라고 한다면 Hook의 대상을 못 가져오는 문제가 있습니다. isBlocked 함수로는 제대로 가져오지 못하는 것 같네요.

일전에 비슷한 작업을 진행해서 끌고오는 것에 한해서는 어떻게 되었던 것같은데 우선은 좀더 찾아보고 테스트를 더 해봐야겠습니다.

그리고... 생각보다 재미가 없을 수도 있구요.

inuit57 commented 3 years ago
function lmn_WyrmAtk1:Bounce(p1, p2, iOwner)
    -- this projectile is only visual, so we can
    -- omit it if the board busystate is not 0.
    -- when scorpions lose their web (state 2),
    -- the projectile would be delayed
    -- until that animation is done.

    if Board:GetBusyState() == 2 then
        return
    end

    local fx = SkillEffect()
    fx.piOrigin = p1
    fx.iOwner = iOwner

    local d = SpaceDamage(p2)
    worldConstants.SetSpeed(fx, .5)
    fx:AddProjectile(p1, d, "effects/shot_firefly2", NO_DELAY)
    worldConstants.ResetSpeed(fx)

    Board:AddEffect(fx)
end
inuit57 commented 3 years ago
else
            local from = path[i-1]

            -- fire bouncing projectile.
            ret:AddQueuedScript(string.format("lmn_WyrmAtk1:Bounce(%s, %s, %s)", from:GetString(), loc:GetString(), id))

            local dir = GetDirection(loc - from)
            d.sImageMark = "combat/lmn_wyrm_arrow_".. dir ..".png"

            ret:AddQueuedDelay(0.12)
            ret:AddQueuedDamage(d)
            ret:AddQueuedScript(string.format("Board:AddAnimation(%s, 'ExploFirefly2', NO_DELAY)", loc:GetString()))

            -- impact sounds
            ret:AddQueuedSound("enemy/centipede_1/attack")
            ret:AddQueuedSound("props/freezing_mine")
            ret:AddQueuedSound("impact/generic/web")
            ret:AddQueuedDelay(0.02)
        end
inuit57 commented 3 years ago

ret:AddQueuedScript 라는 것을 어떻게 활용해서 하는 거 같기는한데

좀더 분석하거나 직업 한번 좀 해보는 게 좋을 듯