YesNoOk
avatar

throw : checking P1's anim in gethit throw state. (Read 1150 times)

Started by Momotaro, January 20, 2021, 06:45:58 pm
Share this topic:
throw : checking P1's anim in gethit throw state.
#1  January 20, 2021, 06:45:58 pm
  • *****
  • A.K.A. NED
  • I like to draw fighting game characters...
Hello,

I have a custom throw with 2 different animations, but using the same state.

I need P2 (the grabbed one) to check P1's anim, to change it's animation accordingly.

I don't know what kind of setting to use.
This is my try. (doesn't work)

If player anim is 1581, the grabbed one change anim to 1585.

[State 1581, ChangeAnim2]
type = ChangeAnim2
triggerall = anim = 1581
trigger1 = !Time
value = 1585

I'm pretty sure there is an effective way to do it.
But I feel rusty, I cannot find the right "trigger"
Thanks

EDIT : OK I suppose I should just double the state and give each of them their own anim, instead of trying to "save space"
Last Edit: January 20, 2021, 11:18:40 pm by Nedflandeurse
Re: throw : checking P1's anim in gethit throw state.
#2  January 20, 2021, 10:13:47 pm
  • avatar
  • **
    • USA
if your game is just 1 on 1 and not simul or tag team, just trigger "enemy,anim=1581" then changeanim2=1585 trigger the change

if you are playing a simul or tag game, it takes a bit more. using "enemy," in teams will mess things up because it counts btoh, so instead you use gethitvar to grab the ID from the player doing it, and pass it into a playerID(gethitvar(whateverparameter)),anim = 1581, then changeanim2=1585.

The most unused paremeter would probably be:
fall.envshake.freq =
fall.envshake.ampl =
fall.envshake.phase =

If using one of those, do not put a time paremeter. Set any of those in P1's grab hitdef equal to ID, for example, fall.envshake.freq = ID. This way when p2 reads the gethitvar(fall.envshake.freq), it'll read the ID number of hte player, that you can then pass on to PlayerID(gethitvar(fall.envshake.freq)),anim = etc etc
Re: throw : checking P1's anim in gethit throw state.
#3  January 20, 2021, 11:19:49 pm
  • *****
  • A.K.A. NED
  • I like to draw fighting game characters...
Thnaks for your reply.
That was exactly what I had in mind.

I completely forgot that these stuff exists "enemy,anim=..."
Re: throw : checking P1's anim in gethit throw state.
#4  January 27, 2021, 05:44:03 pm
  • ****
Thnaks for your reply.
That was exactly what I had in mind.

I completely forgot that these stuff exists "enemy,anim=..."

airforce111 was right

the graber use one of the unused parameter to give his/her own ID
the target use gethitvar(the unused parater) to get the playerID

and use playerid(gethitvar(xxxxx)),anim = ???