Jump to content

Fire Snatcher [Mod Request]


Recommended Posts

Yeah the shadow hand that shows up on an interval number of nights and randomly within caves (or at least i think it is), that takes only some of your fire. I would really like a mod where the hand takes ALL the fire from a source regardless of the amount of fuel.

This may be DST specific, but i dont know i've yet to play DS but i know some mechanics are different between the two versions.

hqdefault.jpg

Link to comment
Share on other sites

I took a quick look at the code... but it seems very very complicated...
it is done via PushAction in the locomoter component with the action Extinguish. This seems to extinguish 0.2 by default from any fire and you can't change this value.
Maybe you could replace it by the action Manualextinguish, were the value can bet set... but I don't know how this would work with this Pushaction stuff...
So I won't put more time into this, ..it is too complicated.

Link to comment
Share on other sites

Make a modmain.lua and add this:

AddPrefabPostInit("shadowhand", function(inst) 
	inst:ListenForEvent("onreachdestination", function(inst, data)
		if data.pos == inst.fire:GetPosition() then
			inst:DoTaskInTime(.55, function() 
				inst.fire.components.burnable:Extinguish() 
			end)
		end
	end)
end)

Should work.

Its kind of a hacky way. It listens for when the hand reaches its destination, being the fire, makes sure its the fire by comparing positions, then extinguishes the fire after .55 seconds, which is how long the hand grabbing animation should be.

Edited by Aquaterion
Link to comment
Share on other sites

26 minutes ago, animefireball said:

YES THANK YOU (well test with friend later tonight)

if it crashes, replace the code in modmain.lua with this, as i'm unsure if the extra code is needed since its server-sided

AddPrefabPostInit("shadowhand", function(inst) 
	if not GLOBAL.TheWorld.ismastersim then
		return inst
	end
	inst:ListenForEvent("onreachdestination", function(inst, data)
		if data.pos == inst.fire:GetPosition() then
			inst:DoTaskInTime(.55, function() 
				inst.fire.components.burnable:Extinguish() 
			end)
		end
	end)
end)

 

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
 Share

×
  • Create New...