Jump to content

FlyTrap crash

  • Version: PC/MAC/Linux Pending

This crash occurred when I approached a carnivorous plant with Wormwood


Steps to Reproduce
When I got close, it crashed

User Feedback

I've found a way that seems to temporarily workaround this issue that might be useful for other brave souls until Klei fixes it properly...

But first... WARNING: This is modifying a game file, and could completely break stuff (including possibly causing the next update you download to fail to install, preventing your game from starting, and other nasty stuff)... do this at your own risk, and don't complain to Klei if this doesn't fix the issue or causes more problems. I do not work for Klei, nor do I have any association with them other than a fan that likes their games. If you are not OK with this risk, just wait for Klei to fix this bug and either don't play as Wormwood or stay far away from FlyTraps until then (Klei is awesome, so you probably won't have to wait too long).

The workaround... modify "retargetfn" in /data/DLC00003/scripts/prefabs/mean_flytrap.lua to the following:

local function retargetfn(inst)
	local notags = {"FX", "NOCLICK","INLIMBO", "wall", "flytrap", "structure", "aquatic"}
	return FindEntity(inst, dist, function(guy)

		if guy:HasTag("plantkin") and (guy:GetDistanceSqToInst(inst) > TUNING.FLYTRAP_TARGET_DIST*TUNING.FLYTRAP_TARGET_DIST or not guy.components.inventory:FindItem(function(item)
                        return is_food(item,inst)
                end)) then
			return false

		return  inst.components.combat:CanTarget(guy)
	end, nil, notags)


Share this comment

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...