YesNoOk
avatar

ChangeAnim2 Confusion (Read 1189 times)

Started by Fighting Toys Freak, January 16, 2019, 05:44:33 pm
Share this topic:
ChangeAnim2 Confusion
#1  January 16, 2019, 05:44:33 pm
  • **
  • New changes, new me!
Hey all,

I have intended to have any opponent that -- when in a get-hit, custom state -- changes its animation triggered by a series of animation element numbers instructed from the causative player's program. A piece of the code shows as follows:

Code:
[State 0, Turn]
type = ChangeAnim2
trigger1 = enemy(0), name = "char" && enemy(0), authorname = "authorname"
trigger1 = ID = (enemy(0), var(16))
trigger1 = enemy(0), Anim = 101
trigger1 = enemy(0), AnimElem = 2
value = 5002

[State 0, Turn]
type = ChangeAnim2
trigger1 = enemy(0), name = "char" && enemy(0), authorname = "authorname"
trigger1 = ID = (enemy(0), var(16))
trigger1 = (enemy(0), Anim = 101)
trigger1 = enemy(0), Anim = 101
trigger1 = enemy(0), AnimElem = 3
value = 5000

The rest of the trigger commands that I have examined from both state controllers executes fine; however, the last set of ones, i.e. the "enemy(0), AnimElem =" ones, has been the only problem, because the system presumably fails to recognize the code in-game at the specific moments.

I have tried to verify the implementation of the code in debug mode; however, the trigger command in question outputs nothing at the call of action:
Code:
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = !IsHomeTeam && gethitvar(isbound) = 1
text = "ver = %d"
params = enemy(0), AnimElem = 2


Please propose any ideas as to how I can implement the desired effect from any opponent in the get-hit, custom state.

I consider all suggestions.
Last Edit: January 17, 2019, 05:16:38 pm by Fighting Toys Freak
Re: ChangeAnim2 Confusion
#2  January 20, 2019, 12:54:15 am
  • *****
  • Shame on you!
    • USA
I take it your displaytoclipboard is in the custom state? If so, just make the trigger1 = 1. The char is in your state, no need to check any further.
trigger1 = (enemy(0), Anim = 101)
trigger1 = enemy(0), Anim = 101   ;no need on this duplicate.

I would put everything in () that's it's own little chunk. Mugen just seems to like it better. 
enemy(0), name = "char" && enemy(0), authorname = "authorname"
might benefit from it.


You may need an ignore hit pause at the bottom of each one.

BUT what I think you're really looking for is,
(enemynear(0), AnimElemNo(0)=1)
to find out if the other player is in animelem 1. This should give you a more consistent read out.
vVv Ryuko718 Updated 10/31/22 vVv
Re: ChangeAnim2 Confusion
New #3  February 15, 2019, 04:26:39 am
  • ****
Hey all,

I have intended to have any opponent that -- when in a get-hit, custom state -- changes its animation triggered by a series of animation element numbers instructed from the causative player's program. A piece of the code shows as follows:

Code:
[State 0, Turn]
type = ChangeAnim2
trigger1 = enemy(0), name = "char" && enemy(0), authorname = "authorname"
trigger1 = ID = (enemy(0), var(16))
trigger1 = enemy(0), Anim = 101
trigger1 = enemy(0), AnimElem = 2
value = 5002

[State 0, Turn]
type = ChangeAnim2
trigger1 = enemy(0), name = "char" && enemy(0), authorname = "authorname"
trigger1 = ID = (enemy(0), var(16))
trigger1 = (enemy(0), Anim = 101)
trigger1 = enemy(0), Anim = 101
trigger1 = enemy(0), AnimElem = 3
value = 5000

The rest of the trigger commands that I have examined from both state controllers executes fine; however, the last set of ones, i.e. the "enemy(0), AnimElem =" ones, has been the only problem, because the system presumably fails to recognize the code in-game at the specific moments.

I have tried to verify the implementation of the code in debug mode; however, the trigger command in question outputs nothing at the call of action:
Code:
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = !IsHomeTeam && gethitvar(isbound) = 1
text = "ver = %d"
params = enemy(0), AnimElem = 2


Please propose any ideas as to how I can implement the desired effect from any opponent in the get-hit, custom state.

I consider all suggestions.

You may need to add
ignorehitpuase = 1

and don't use enemy(0)
enemy(0) will not 100% be the attacker.

use hitdef to pass the attacker's player ID to the target
them use PlayerID(xxxx),animtime

if you need example you can check my Morrigan or ryu
Why I use it because I want to make throw breakable by a 3rd party.
the guy who got hit need to know what the state of the attacker.

if the attacker got hit he need to do something else.
Last Edit: February 15, 2019, 05:44:18 am by beterhans