YesNoOk
avatar

Explod/PlaySnd on WinKO (Read 1393 times)

Started by PineappleProducer, December 11, 2013, 06:38:55 pm
Share this topic:
Explod/PlaySnd on WinKO
#1  December 11, 2013, 06:38:55 pm
  • ***
  • My username has a history to it.
    • USA
    • pineappleproducer.webs.com/
So, I've tried different methods, and no dice, so I figured i'd bring the issue up here.

So i'm trying to make a move that, if the opponent is defeated by it, the normal sound that plays is changed to be a different sound, and an explosion appears over the opponents body. I tried everything I can think of, and this is the latest concoction of code I mustered. Sadly all this code manages to is play the normal sound effect, regardless of whether the opponent was KO'd or not, with no explosion showing up at all. This state is for the end of the attack and not the attack itself.

Here's the code:
 
Spoiler, click to toggle visibilty


Also, is there a method for making a defeated opponent remain invisible, even after the custom state is over with? Any help would be vastly appreciated. :)
*I have an uncle who can't grasp why Donkey Kong isn't on PlayStation 3.
*EMBRACE YOUR INNER WEEABOO!!! :D
*Proud owner of Godzilla on PS4.

Re: Explod/PlaySnd on WinKO
#2  December 11, 2013, 09:16:09 pm
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
No. But only in a closed game, and the defeated opponent's state has the invisible assertspecial code written in its own states.

The only other way to have them remain invisible is to put them in a custom 5150 lie down state that includes the invisible controller.

"You must defeat my flaming
dragon punch to stand a chance."

DW

Re: Explod/PlaySnd on WinKO
#3  December 11, 2013, 09:24:18 pm
  • *****
    • USA
    • www.trinitymugen.net
Are you sure? I think I remember a Gundam char that made p2 explode when finished with a super move. The char is gone(invisible) when this happens. I think it was Char's Zaku(GM)...?
Re: Explod/PlaySnd on WinKO
#4  December 13, 2013, 02:26:20 pm
  • *
  • Thunder Frog
So just to clarify, this is a single statedef with odd state numbers in the controls, not snippets from different states related to the effect you're looking for, right?

Assuming that its a single statedef with weird state numbers plugged in, your PlaySnd will never work correctly because of how states are read and the animelem trigger works. States are read top to bottom, and the animelem trigger is true only on the first game-tick that a given animation element is reached; animelem = 1 and animelemtime(1) = 0 are functionally identical triggers. Reading that as a single state, the PlaySnd control is triggered on the first tick of the state only, and this happens before your VarSet control sets the variable to 1, so you will always get the 'false' return from the ifelse. In situations like that, you don't technically even need to set a variable, as a line like value = 6000, 14 + (WinKO) gives the exact same results (playing 6000, 14 if the character is not KO'd and 6000, 15 if they are).

As for why your explod isn't displaying, it's honestly hard to say, assuming that I'm looking at a single statedef. So if you could clarify a bit that might help me track down the problem.
Re: Explod/PlaySnd on WinKO
#5  December 13, 2013, 10:23:36 pm
  • ***
  • My username has a history to it.
    • USA
    • pineappleproducer.webs.com/
ok, this state is the final part of a single move, starting with an attack state, in which the opponent is grabbed. afterwards, the character changes into a successful grab state, and after making contact with a wall (the character and opponent are moving), the character changes into another state, as does the opponent. After the attack is over, the character goes into the state in question, while the opponent goes into a custom state shortly before going into a lying down state. Whether this has anything to do with the matter or not, the way I have the code set up, I have the opponent, while they are in the last custom state, use the LifeAdd controller to subtract the desired amount of life specified.

So, essentially, the move goes as follows:

Player: Grab Attempt (State 3865) --> Successfully Grabbed Opponent (State 3866) --> Pin up Against the Wall (State 3867) --> Finishing Stance (State 3863) --> Standing

Opponent: Grabbed (State 3885) --> Pinned up Against Wall (State 3886) --> Lie Down Custom State (State 3881) --> Normal Lie Down (or Dead if their life is depleted) 
*I have an uncle who can't grasp why Donkey Kong isn't on PlayStation 3.
*EMBRACE YOUR INNER WEEABOO!!! :D
*Proud owner of Godzilla on PS4.

Re: Explod/PlaySnd on WinKO
#6  December 14, 2013, 01:13:56 pm
  • *
  • Thunder Frog
Hmmm. It might be a timing error, where the LifeAdd controller in the custom state is triggering after time = 1 in your 'finish state' controller. It could also be something related to roundstates changing and p2 ceasing to exist from the game's point of view (roundstate 3 is very short when the enemy is already laying on the ground, and many things related to p2 return bottom when roundstate reaches 4).

The first thing I would try is to loosen up the trigger in your finish pose state. Try replacing trigger1 = var(45) = 1 && time = 1 with trigger1 = WinKO && !numexplod(6130) and see if things start working better. If it does, you know the issue is in the timing between the states and can tweak appropriately if you're looking for specific timing.

If that doesn't work, you could try a State -3 control that checks for WinKO and a stateno (or prevstateno) of the finising pose and triggers the explod there. That's how a lot of the 'Hyper Move Finish' BGs are coded, so it's also a possibility for making it work.

If neither of those work, lemme know and I'll try to think of something else.
Re: Explod/PlaySnd on WinKO
#7  December 14, 2013, 04:34:34 pm
  • ***
  • My username has a history to it.
    • USA
    • pineappleproducer.webs.com/
thanks for the help, but i finally figured out what i did wrong, i think (either way it works now :P )

i didn't have the TargetState controller in the finishing pose state, instead i had it trigger at the very last tick in the previous state, so they technically KO'd before the state where the PlaySnd and Explod controllers would have detected it. >_<

and, after a little digging, i even found out how to turn the opponent invisible in their lie dead state. :D

once again, thanks for the suggestions, i appreciate the help! :D
*I have an uncle who can't grasp why Donkey Kong isn't on PlayStation 3.
*EMBRACE YOUR INNER WEEABOO!!! :D
*Proud owner of Godzilla on PS4.

Re: Explod/PlaySnd on WinKO
#8  December 14, 2013, 07:11:33 pm
  • *
  • Thunder Frog
So it was a timing error. Well, I'm glad it's working now. Happy coding!