How do I make M1 Cancelling like deepwoken

Client-sided animations are very easy to do and the price of not using them can be servere.

You’d have to make a new bool for every attack, whereas with a newproxy() (or incremented number, whichever is easier for you), you only need one.

What’s a use case for animation events where they aren’t outpreformed by other methods? Maybe if you plan on having a time-slow mechanic, but that would be very complicated for a beginner progammer. task.wait() is much easier to understand, adjust, and work with.

You’re telling me that task.wait() is more complex than using an animation event? Let me compare the two:

function Attack1()
	task.wait(x)
	Hitbox()
end

function Attack2()
	AttackAnimation:Play()
	local AnimEvent
	AnimEvent = AttackAnimation:GetMarkerReachedSignal("DealDamage"):Connect(function()
		Hitbox()
		--Sure, you could disconnect here, but what if there's multiple DealDamage events?
	end)
	task.wait(x) --oh wait, we end up using task.wait anyways.. shame.
	AnimEvent:Disconnect()
end

I’d also like to point out none of your functions appear to disconnect, causing memory leaks.

Fair point, but if client sided hitboxes were to be used, your system could not send the RemoteEvent early (and then have the client wait based of the time it took for the event to go through) to sync up the hitboxes.

Simple code is great! Until the results needed cannot be given by adjusting the simple code, and you need to rewrite the whole system to be more adaptable anyways.

1 Like

Alright alright I do realize my method was kinda trash :sob: but I honestly didn’t put a whole lot of thought into the reply before recommending a way to do it.

I do agree that client animations and hitboxes, not using animation events, and other ways besides bool variables are the better method in the end.

My reply wasn’t intended to be the end all be all of how you could accomplish an attack feinting system. There’s about a thousand different ways to do anything in this engine and I think it’s a bit silly to debate which is the best. It really just depends on the game itself, which we don’t have enough context for.

1 Like

it worked the best and I already have an animation client script anyway also i’m not that much of a beginner but for whatever reason this stumped me even though it seems as if the fix wasn’t too hard

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.