Jump to content

[Help]How to Change "MkeHauntableLaunch" to "MakeHauntableLaunchAndPerish" by "AddPrefabPostInit"

Recommended Posts

Hello! I make a mod to change "axe" item components. Let it have "fueled" component. I search this component and know must change "MkeHauntableLaunch" to "MakeHauntableLaunchAndPerish". The "fueled" component is work. But I code with "AddPrefabPostInit" and Add "MakeHauntableLaunchAndPerish". The mod running error, show message "MakeHauntableLaunchAndPerish(nill)", please tell me how to work.

table.insert(TUNING, "MED_PERISHTIME")TUNING.MED_PERISHTIME = TUNING.TOTAL_DAY_TIME * 30local function MedPerish(prefab)	if(prefab.components.fueled == nil) then		prefab:AddComponent("fueled")		-- prefab.components.fueled.fueltype = FUELTYPE.USAGE		prefab.components.fueled:InitializeFuelLevel(TUNING.MED_PERISHTIME)		prefab.components.fueled:SetDepletedFn(prefab.Remove)		if prefab.components.fueled then			prefab.components.fueled:StartConsuming()        		end			MakeHauntableLaunchAndSmash(prefab)	end	endAddPrefabPostInit("axe", MedPerish)
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...