Author Topic: Disable spin Attack?  (Read 85 times)

zutokaza

  • Full Member
  • ***
  • Posts: 133
  • Active - Making stories can take the most time.
    • View Profile
Disable spin Attack?
« on: April 12, 2017, 12:16:54 am »
is it possible to disable the spin attack?

MetalZelda

  • Sr. Member
  • ****
  • Posts: 454
    • View Profile
Re: Disable spin Attack?
« Reply #1 on: April 15, 2017, 02:08:38 pm »
You can, by overwriting the spin attack loading state in hero:on_state_changed

just unfreeze the hero and that would work

zutokaza

  • Full Member
  • ***
  • Posts: 133
  • Active - Making stories can take the most time.
    • View Profile
Re: Disable spin Attack?
« Reply #2 on: April 16, 2017, 07:22:12 am »
Could I get an example?

I tried this, but is fails...
Code: Lua
  1. function hero:on_state_changed("sword spin attack")
  2.   hero:unfreeze()
  3. end

zutokaza

  • Full Member
  • ***
  • Posts: 133
  • Active - Making stories can take the most time.
    • View Profile
Re: Disable spin Attack?
« Reply #3 on: April 16, 2017, 10:18:40 am »
I got it somewhat working now, but it does not disable anything. It just unfreezes the player after a spin attack.

Code: Lua
  1. function hero:on_state_changed(state)
  2.  
  3.   if state == "sword spin attack" then
  4.     hero:unfreeze()
  5.   end
  6. end