饥荒筋斗云修改方法

2022-04-08 21:50:14   第一文档网     [ 字体: ] [ 阅读: ] [ 文档下载 ]
说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。下载word有问题请添加QQ:admin处理,感谢您的支持与谅解。点击这里给我发消息

#第一文档网# 导语】以下是®第一文档网的小编为您整理的《饥荒筋斗云修改方法》,欢迎阅读!
筋斗,饥荒,修改,方法

饥荒筋斗云修改方法

饥荒筋斗云修改方法介绍的是使用文本形式修改,让您在饥荒游戏中能使用筋斗云的方法,按键盘Z键召唤筋斗云在天上飞行,再按Z键落地。



用记事本打开游戏目录\data\DLC0001\scripts\prefabs\player_common.lua文件,在inst:AddComponent(“resurrectable”)的下一行插入以下内容: 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键,召唤筋斗云在天上飞行,用键盘WSAD键控制方向,再次按Z键可落地。


本文来源:https://www.dywdw.cn/3959d2ea4328915f804d2b160b4e767f5acf80dd.html

相关推荐
推荐阅读