YesNoOk
avatar

detect if the character is attacked in a specific state (Read 1026 times)

Started by N0BIE, November 24, 2021, 01:35:03 PM
Share this topic:
detect if the character is attacked in a specific state
#1  November 24, 2021, 01:35:03 PM
  • avatar
Code:
[State 0, VarSet]
type = VarSet
trigger1 = gethitvar(damage)
trigger1 = stateno = [600,640]
v = 1
value = 1
ignorehitpause = 1
I want to set the var if the character is attacked in stateno 600~640
But the character can't detect the variable at all. Is there something wrong?
Re: detect if the character is attacked in a specific state
#2  November 25, 2021, 04:05:47 PM
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
When your character is hit, he's no longer in state 600-640, he's in a gethit state which is on the 5000 range.

Use prevstateno or movehit=H
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!