饥荒是一款非常受欢迎的生存游戏,玩家们需要在游戏中不断探索、收集资源、建造基地,并抵抗各种各样的敌人。在游戏中,浮木是一种非常重要的资源,可以用来建造船只、钓鱼等。那么,如何在饥荒中获取浮木呢?下面就为大家介绍一些方法,同时附上对应的代码。

方法一在海边寻找
在饥荒中,浮木主要出现在海边,因此玩家们可以在海边寻找。当玩家在海边看到一些漂浮的木头时,就可以使用斧头或石斧将其砍下来。下面是对应的代码
```cctionpickupst, worker)stponents.lootdropperDropLoot()stove()d
ctionhitst, worker)otsttstimStateimation("hit")stimStateimation("idle")dd
ctionbuiltst)stimStateimation("place")stimStateimation("idle")d
ction()sttity()
sttitysform()sttityimState()sttitydEmitter()sttityddNetwork()
stimStatek("floatwood_log")stimStateSetBuild("floatwood_log")stimStateimation("idle")
stddTag("float")stddTag("log")
ventoryPhysicsst)
sttitye()
otastersimstd
stponentventoryitem")stponentsventoryitemPickupFnpickup)
stponentspectable")
stponent("fuel")stponents.fuel.fuelvalue = TUNING.SMLL_FUEL
stponent("lootdropper")
stponent("workable")stponents(CTIONS.CHOP)stponents.workableSetWorkLeft(1)stponentsFinishCallbackhammered)stponentsWorkCallbackhit)
tableLaunchst)
monventory, assets)
方法二在洪水中寻找
在某些情况下,浮木也会出现在洪水中,玩家们可以在洪水中寻找。当玩家在洪水中看到一些漂浮的木头时,就可以使用斧头或石斧将其砍下来。下面是对应的代码
local assets =
{im/floatwood_log.zip"),
local prefabs =
"log",
"splash_water",
ctionpickupst, worker)stponents.lootdropperDropLoot()Prefabsformstsform())stove()d
ctionhitst, worker)otsttstimStateimation("hit")stimStateimation("idle")dd
ctionbuiltst)stimStateimation("place")stimStateimation("idle")d
ction()sttity()
sttitysform()sttityimState()sttitydEmitter()sttityddNetwork()
stimStatek("floatwood_log")stimStateSetBuild("floatwood_log")stimStateimation("idle")
stddTag("float")stddTag("log")
ventoryPhysicsst)
sttitye()
otastersimstd
stponentventoryitem")stponentsventoryitemPickupFnpickup)
stponentspectable")
stponent("fuel")stponents.fuel.fuelvalue = TUNING.SMLL_FUEL
stponent("lootdropper")
stponent("workable")stponents(CTIONS.CHOP)stponents.workableSetWorkLeft(1)stponentsFinishCallbackhammered)stponentsWorkCallbackhit)
tableLaunchst)
, assets, prefabs)
方法三通过交易获得
除了在海边和洪水中寻找,玩家们还可以通过交易获得浮木。在饥荒中,玩家们可以与一些NPC进行交易,获得一些稀有的物品,其中就包括浮木。下面是对应的代码
local assets =
{im/floatwood_log.zip"),
local prefabs =
"log",
ctionpickupst, worker)stponents.lootdropperDropLoot()stove()d
ctionhitst, worker)otsttstimStateimation("hit")stimStateimation("idle")dd
ctionbuiltst)stimStateimation("place")stimStateimation("idle")d
ction()sttity()
sttitysform()sttityimState()sttitydEmitter()sttityddNetwork()
stimStatek("floatwood_log")stimStateSetBuild("floatwood_log")stimStateimation("idle")
stddTag("float")stddTag("log")
ventoryPhysicsst)
sttitye()
otastersimstd
stponentventoryitem")stponentsventoryitemPickupFnpickup)
stponentspectable")
stponent("fuel")stponents.fuel.fuelvalue = TUNING.SMLL_FUEL
stponent("lootdropper")
stponent("workable")stponents(CTIONS.CHOP)stponents.workableSetWorkLeft(1)stponentsFinishCallbackhammered)stponentsWorkCallbackhit)
tableLaunchst)
, assets, prefabs)
以上就是在饥荒中获取浮木的三种方法和对应的代码。