Jump to content

Event for on begin attack action?


Recommended Posts

Hello, I need help!

So, if someone can help tell me is there a event that plays right when the player starts a attack? I tried "onattackother" but that plays after you landed a attack..because I wanna play a different state & I need it to happen before the attack animation starts when you're doing a attack :(..

 

If there's no event like that then does someone know how I can play a different state for a action?

I tried something like this

Spoiler

local handle = inst.sg.sg.actionhandlers[ACTIONS.ATTACK]
handle.deststate = function(inst) return "critical" end

 

but I don't know how to undo it :(.. So, any help would be very great :D!

Edited by SuperDavid
Link to comment
Share on other sites

"startaction" event seems to never get triggered no matter what I do, unfortunately :(...but thanks for your help, Aquaterin :D!

I guess there's no event for something like this, that's a bummer but oh well..

Edited by SuperDavid
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...