Jump to content

Recommended Posts

Hello, I have a question! So, I want to give my mod character some special mode he can enter & I thought it would be cool if he could glow while in that keyhandler action mode thingy :). So... Is it possible to put the haunt glow on characters forever then remove it on a certain event?

I would super really duper amazingly appreciate any kind of help at all, thank you so, SO much for reading my question :D!

I hope you have a wonderful, amazing great day/night :D!

Sorry to bother you again DarkXero, but you wouldn't happen to know how to make a character receive no stun/hit animation when getting hit then changing it back to them being able to get stunned after like a event? Would you :)?

44 minutes ago, SuperDavid said:

no stun/hit animation when getting hit

inst.AdamDontGetHit = true

 

44 minutes ago, SuperDavid said:

changing it back to them being able to get stunned

inst.AdamDontGetHit = nil

 

This thing in modmain enables you to use the stuff mentioned.

AddStategraphPostInit("wilson", function(sg)
	local _attacked = sg.events.attacked.fn
	sg.events.attacked.fn = function(inst, data)
		local old_stunlock = nil
		local attacker = nil
		if inst.AdamDontGetHit then
			data = data or {}
			attacker = data.attacker
			data.attacker = data.attacker or {}
			data.attacker.components = data.attacker.components or {}
			data.attacker.components.combat = data.attacker.components.combat or {}
			old_stunlock = data.attacker.components.combat.playerstunlock
			data.attacker.components.combat.playerstunlock = GLOBAL.PLAYERSTUNLOCK.NEVER
			inst.sg.timeinstate = 0
		end
		_attacked(inst, data)
		if inst.AdamDontGetHit and attacker and attacker:IsValid() then
			attacker.components.combat.playerstunlock = old_stunlock
		end
	end
end)

 

Edited by DarkXero

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...