YesNoOk
avatar

Use fightfx animation as a trigger (Read 2627 times)

Started by DR119, January 02, 2018, 02:18:28 pm
Share this topic:
Use fightfx animation as a trigger
New #1  January 02, 2018, 02:18:28 pm
  • avatar
  • **
I want to use an animation from fightfx.air as a trigger. I tried to use the "Anim" trigger with f301 as a value, but that results in an error message.
Code:
[State 320]
type = PlaySnd
trigger1 = Anim = f320
value = f320, 0
Is the syntax incorrect or is it impossible to use a fightfx anim as a trigger?
Last Edit: January 11, 2018, 07:14:36 pm by DR119
Re: Use fightfx animation as a trigger
#2  January 02, 2018, 03:18:26 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Anim trigger evaluates the player's current animation.  Like when you are standing still the anim trigger will return "0", walking it will return "20", etc.

I'm going to go ahead and assume you did not ChangeAnim to f301.  So you do not want the Anim trigger.


If you used f301 as an Explod, what you need to do is give that Explod an ID using the ID parameter, then use:

Code:
[State 320, Play Sound]
type = PlaySnd
trigger1 = numexplod(301)
value = f320, 0
persistent = 0

If f301 is displayed as a hitspark, called on by a HitDef parameter, then you cannot use that effect as a trigger, you would instead just detect that the hit made contact using other triggers.

Re: Use fightfx animation as a trigger
#3  January 03, 2018, 02:05:55 am
  • *****
  • Shame on you!
    • USA
Depending on how and where your animation is happening you may just want to use the triggers that spawned it.
Checking for the animation will trigger because it's spawned. Well, just set the sound to go off for the same reason.
Unless you're in a 2nd state that didn't spawn the animation...

Remember, sounds are really good at firing off multiple times. You're going to want to lock it down to fire 1 time. Just checking if there's a helper will make a screeching noise instead of what you expect.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Use fightfx animation as a trigger
#4  January 11, 2018, 11:10:34 am
  • avatar
  • **
    • Vietnam
Making an custom Explod sctrl using Hitpark's anim, place an ID in it

[State Explod]
type = Explod
trigger1 = ...
anim = f320
ID = 320
-------------------------------
If u want to trigger:

[State ]
type = ???
trigger1 = Numexplod(320) = 1
value = ???
------Tremble Mortal and Despair. Doom has come to this world------