跑跑車首頁

當(dāng)前位置:首頁攻略秘籍單機(jī)秘籍 → 饑荒筋斗云修改方法

饑荒筋斗云修改方法

作者:黎九來源:本站整理 發(fā)表時(shí)間:2014/5/23 11:24:14 評論(0)

饑荒筋斗云修改方法介紹的是使用文本形式修改,讓您在饑荒游戲中能使用筋斗云的方法,按鍵盤Z鍵召喚筋斗云在天上飛行,再按Z鍵落地。


用記事本打開游戲目錄\data\DLC0001\scripts\prefabs\player_common.lua文件,在inst:AddComponent(“resurrectable”)的下一行插入以下內(nèi)容:
TheInput:AddKeyUpHandler(KEY_Z, function()
     if not inst:HasTag("flycloud") then
        inst:AddTag("flycloud")
        inst.components.locomotor:Stop()
        inst.components.talker:ShutUp()
        SpawnPrefab("collapse_small").Transform:SetPosition(inst.Transform:GetWorldPosition())
        inst.AnimState:PlayAnimation("give")
        inst:DoTaskInTime(0.3, function()
            inst.cloud = SpawnPrefab("corn_cooked")
            inst.cloud.Physics:SetActive(false)
            inst.cloud.Transform:SetScale(1.8, 1.8, 1.8)
            inst.cloud.AnimState:SetMultColour(255/255,255/255,255/255,0.6)
            inst.cloud.AnimState:SetBloomEffectHandle("shaders/anim.ksh")
            inst.cloud:RemoveComponent("perishable")
            inst.cloud:RemoveComponent("edible")
            inst.cloud:RemoveComponent("stackable")
            inst.cloud:RemoveComponent("inventoryitem")
            inst.cloud:RemoveComponent("bait")
            inst.cloud:RemoveComponent("tradable")
            inst.cloud:RemoveComponent("burnable")
            inst.cloud:RemoveComponent("propagator")
            inst.cloud.persists = false
            inst.cloud:AddTag("NOCLICK")
            local follower = inst.cloud.entity:AddFollower()
            follower:FollowSymbol( inst.GUID, "swap_body", 0, 60, 0 )
            local pt = inst:GetPosition()
            inst.Transform:SetPosition(pt.x, 10, pt.z)
            local shadow = inst.entity:AddDynamicShadow()
            shadow:SetSize( 0, 0 )
            inst.gogogo = inst:DoPeriodicTask(.01, function() inst.Physics:SetMotorVelOverride(25,1.5,0) end)
        end )
     else
        inst:RemoveTag("flycloud")
        inst.components.locomotor:Stop()
        inst.components.talker:ShutUp()
        SpawnPrefab("collapse_small").Transform:SetPosition(inst.Transform:GetWorldPosition())
        inst.AnimState:PlayAnimation("give")
        inst:DoTaskInTime(0.3, function()
            if inst.cloud then inst.cloud:Remove() inst.cloud = nil end
            if inst.gogogo then inst.gogogo:Cancel() inst.gogogo = nil end
            local pt = inst:GetPosition()
            inst.Transform:SetPosition(pt.x, 0, pt.z)
            local shadow = inst.entity:AddDynamicShadow()
            shadow:SetSize( 1.3, .6 )
            inst.Physics:ClearMotorVelOverride()
            inst.Physics:ClearMotorVelOverride()
        end )
     end
end )
即可口中默念咒語——“走你”,并按下鍵盤Z鍵,召喚筋斗云在天上飛行,用鍵盤W、S、A、D鍵控制方向,再次按Z鍵可落地。


玩家評論
我要點(diǎn)評

網(wǎng)名 注:您的評論需要經(jīng)過審核才會顯示出來。

已有 0 位玩家參與點(diǎn)評
下載排行