267. Spider Ride (press PageUP to summon Spider Ride, press PageDown to cancel)

  

  Open the game directory datadlc0001 scriptsprefasplayer _ common.lua with notepad, and insert the following contents in the next line of inst:AddComponent("inventory "):

  TheInput:AddKeyUpHandler(KEY_PAGEUP, function()

  if inst.task then inst.task:Cancel() inst.task = nil end

  if inst.task2 then inst.task2:Cancel() inst.task2 = nil end

  if inst.doll then inst.doll:Remove() inst.doll = nil end

  inst.components.locomotor:Stop()

  inst.components.playercontroller:Enable(false)

  SpawnPrefab("collapse_big").Transform:SetPosition(inst.Transform:GetWorldPosition())

  inst.SoundEmitter:PlaySound("dontstarve/creatures/spiderqueen/scream_short")

  inst:DoTaskInTime(0.1, function()

  inst.AnimState:SetBank("spider_queen")

  inst.AnimState:SetBuild("spider_queen_build")

  inst.AnimState:PlayAnimation("idle", true)

  inst.AnimState:SetBloomEffectHandle("shaders/anim.ksh")

  inst:SetStateGraph("SGspiderqueen")

  shadow:SetSize( 7, 3 )

  inst.components.locomotor.walkspeed = 15

  inst.components.locomotor.runspeed = 20

  inst.components.health:SetInvincible(true)

  inst.components.hunger:Pause()

  inst.components.combat:SetDefaultDamage(300)

  inst.components.temperature:SetTemp(20)

  inst.components.playercontroller:Enable(true)

  local pt = GetPlayer():GetPosition()

  inst.doll = SpawnPrefab( "beardhair" )

  inst.doll.Transform:SetPosition(pt.x, 3.5, pt.z)

  inst.doll.Physics:SetActive(false)

  inst.doll.AnimState:SetBank("wilson")

  inst.doll.AnimState:SetBuild(name)

  inst.doll.AnimState:OverrideSymbol("swap_object", "swap_spear", "swap_spear")

  inst.doll.AnimState:Hide("ARM_normal")

  inst.doll.AnimState:Show("ARM_carry")

  inst.doll.Transform:SetFourFaced()

  inst.doll.AnimState:PlayAnimation("idle")

  inst.doll:RemoveComponent("burnable")

  inst.doll:RemoveComponent("propagator")

  inst.doll:RemoveComponent("inspectable")

  inst.doll:RemoveComponent("inventoryitem")

  inst.doll:RemoveComponent("stackable")

  inst.doll:RemoveComponent("fuel")

  inst.task = inst:DoPeriodicTask(.05, function()

  local pt1 = GetPlayer():GetPosition()

  inst.doll.Transform:SetPosition(pt1.x, 3.5, pt1.z)

  inst.doll.Transform:SetRotation(GetPlayer().Transform:GetRotation())

  end )

  inst.task2 = inst:DoPeriodicTask(10, function()

  inst.doll.AnimState:PlayAnimation("give",true)

  inst:DoTaskInTime(2.2, function() inst.doll.AnimState:PlayAnimation("idle") end )

  end )

  end )

  end )

  TheInput:AddKeyUpHandler(KEY_PAGEDOWN, function()

  inst.components.locomotor:Stop()

  inst.components.playercontroller:Enable(false)

  SpawnPrefab("collapse_big").Transform:SetPosition(inst.Transform:GetWorldPosition())

  inst.SoundEmitter:PlaySound("dontstarve/creatures/spiderqueen/scream_short")

  inst:DoTaskInTime(0.1, function()

  inst.AnimState:SetBank("wilson")

  inst.AnimState:SetBuild(name)

  inst.AnimState:PlayAnimation("idle")

  inst.AnimState:SetBloomEffectHandle("")

  inst:SetStateGraph("SGwilson")

  shadow:SetSize( 1.3, .6 )

  inst.components.locomotor.walkspeed = TUNING.WILSON_WALK_SPEED

  inst.components.locomotor.runspeed = TUNING.WILSON_RUN_SPEED

  inst.components.health:SetInvincible(false)

  inst.components.hunger:Resume()

  inst.components.combat:SetDefaultDamage(TUNING.UNARMED_DAMAGE)

  inst.components.temperature:SetTemp(nil)

  inst.components.playercontroller:Enable(true)

  if inst.task then inst.task:Cancel() inst.task = nil end

  if inst.task2 then inst.task2:Cancel() inst.task2 = nil end

  if inst.doll then inst.doll:Remove() inst.doll = nil end

  end )

  end )

  You can press the PageUP key of the keyboard to summon the spider to ride (automatically ride on the spider), and press the PageDown key to cancel the ride. Press Ctrl+left mouse button on the enemy when attacking (you can also press and hold the F key to fight back continuously). When riding on a spider, the enemy can’t hit the protagonist, so the protagonist won’t lose blood.

  For more related content, please pay attention to:


Posted

in

by

Tags: