YesNoOk
avatar

Reading Target Commands With Helpers? (Read 475 times)

Started by George777, February 09, 2021, 09:43:15 PM
Share this topic:
Reading Target Commands With Helpers?
#1  February 09, 2021, 09:43:15 PM
  • avatar
This is a follow-up from this thread: https://mugenguild.com/forum/topics/changeanim2-doesnt-use-my-animations--192379.0.html

So I managed to create a system where the opponent is held in place (and made invisible) by a Helper, for the sake of using my own animations, when the opponent gets hit.

So now, I have a new problem. I wanted to have a system where a variety of animations could play, depending on the opponent's inputs, while being bound. I used the typical "Target, Command" function and nothing happened. I've been trying a lot of different solutions, but I'm starting to get the suspicion that Helpers can't read Target commands, at all.

Here's the base code so far:

Code:
;Grab Helper
[Statedef 4000]
type = A
movetype= H
physics = N
anim = 4000
velset = 0,0
sprpriority = 5

[state PressBack]
type = changeanim
trigger1 = anim = 4000
trigger1 = target, command = "holdback"
value = 4007

[state ReturntoNeutral]
type = changeanim
trigger1 = anim != 4000
trigger1 = animtime = 0
value = 4000

Could someone more experienced confirm to me, that Helpers are not capable of reading Target commands? Or barring that, if there's some kind of error in this code?

(I know that using "Parent, Command" can allow my own commands to be read from a Helper, btw)

If Helpers aren't capable of directly reading Target commands, what would you suggest as the simplest solution?

Also, to those who helped me out in the previous thread, thanks :thumbsup:
Last Edit: February 09, 2021, 11:55:28 PM by George777
Re: Reading Target Commands With Helpers?
#2  February 09, 2021, 11:33:51 PM
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
Target command only works if there is a target; the target is not shared, meaning only the player or Helper that actually hit the opponent has a target. What you want is a double redirect like root,target,command, which isn't possible in that exact form, but can be replicated with the cond() exploit.

For this particular example, it would look like this:
Code:
[state PressBack]
type = changeanim
trigger1 = anim = 4000
trigger1 = root,cond(numtarget,target,cond(1,command = "holdback",0),0)
value = 4007
3DS FC: 0516 - 7483 - 3564
Oh, I want a diagram. I fucking love diagrams.
Re: Reading Target Commands With Helpers?
#3  February 09, 2021, 11:55:05 PM
  • avatar
Re: Reading Target Commands With Helpers?
#4  February 10, 2021, 11:14:48 AM
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
or, if you don't mind the 1-tick delay (or more depending the number of helpers you have), it may be possible for the helper to set a variable depending on target,command and then the root player just needs to acces the helper's variable
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!