8 buttoms, custom longer loss animation, regen, and inescapable shortrange grab?

Started by Cleverpony72, September 17, 2015, 11:16:15 PM

Previous topic - Next topic

Cleverpony72

Hi. There are four things left that I'm not sure how to code.
1. I want to create a custom loss animation, with a sound effect. When my character loses all hp, a sound effect will play, he'll do a custom animation, leave behind an object, and then walk off the side of the screen, disappearing. Then round 2 will begin, or the enemy's win quote will display, or something. I'd like this loss animation to be unskippable. If he can be rigged to walk away from the opponent, that'd be great, but if not, he'll go left.
2: A grab that will grab the opponent, and my character will leap back and perform a suplex into a portal. Both fighters will disappear. After two seconds, my character will teleport and appear on the ground, unharmed, and then a portal will appear and the enemy will be slammed down into the ground, dealing considerable damage, since this attack will cost 1 power bar. This is when the second word of the attack's name will be said. I don't want the opponent to be able to escape this grab with any kind of anti-grab button. What's the coding for this?
3. This character (A different one) will constantly regenerate 1% of his health every second. If you hold a certain button, he'll regenerate an extra 3%, becoming a total 4% regen. Or he'll just set his regen to 4 whole you're holding that button. He'll also have a custom animation while that button is being held, and build 2% of the power bar while you hold it.
4. The character mentioned will have eight buttons. Z X C V A S D and F. I know there are characters with three, four, and six buttons, but how do I give him eight buttons, plus a taunt B button that'll be one of four taunts depending on directional input?

Felkazz

Note: I use a letter to states because you can decide the state number you want and it is easy to understand wich state goes to the other one
1)
On StateDef -2, put something like this to detect that the character lost the round and to send it to the custom animation state.

[State -2, Detecting lost round]
Type = ChangeState
Trigger1 = RoundState = 3 ;<-- The moment a winner is decided, this will prevent the animation from being skippable
Trigger1 = Lose ;<-- Lost the round
Trigger1 = StateNo = 5150 ;<-- Is lying down on the ground
Value = X ;<-- Custom animation state


Now, you need to create the state "X", this state will have an invisible animation, we will use a helper to create the animation, but remember that we are in RoundState = 3, the game will only finish the round if it is on RoundState = 4, so, in order to advance the state, we will need to make the character go back to state 5150 and stay invisible in there after the helper is gone.

[StateDef X]
Type = S
MoveType = I
Ctrl = 0
Anim = X; <-- Invisible animation
VelSet = 0 ,0 ;<-- Prevents any sliding effect from state 5150

[State X, Helper]
Type = Helper
Trigger1 = !Time
Name = "Custom Lose Animation"
ID = Y
StateNo = Y ;<-- Helper State
Pos = 0, 0
PosType = P1
Facing = 1

[State X, Custom Animation Over]
Type = ChangeState
Trigger1 = !NumHelper(Y) ;<-- After the helper is destroyed
Value = 5150
Ctrl = 0


To keep the char invisible after the custom animation, add this to StateDef -2 or add it on state 5150 if your char has its own Common and you can edit state 5150, adding it to the state 5150 will prevent the char from appearing for 1 tick after the custom animation is over.

[State -2, Invisible]
Type = AssertSpecial
Trigger1 = StateNo = 5150
Trigger1 = RoundState >= 3
Flag = Invisible  ;Let the char invisible


Now, we need to code the helper on state "Y", we'll also use an state "Z" that will be the helper walking.

[StateDef Y]
Type = S
MoveType = I
Anim = Y ;<-- This is the custom animation that you want.

; Add all the code you want for the custom animation here, be it effects, sounds, whatever you want.

[State Y, Deciding the way] ;<-- Lets turn the helper to right side
Type = Turn
TriggerAll = !AnimTime
Trigger1 = NumEnemy = 1 ;<-- If there is only one enemy
Trigger1 = Enemy,Pos X < Pos X ;<-- The enemy is to the left of the char
Trigger1 = Facing = -1 ;<-- And the helper is looking to the left
Trigger2 = NumEnemy = 1 ;<-- If there is only one enemy
Trigger2 = Enemy,Pos X >= Pos X ;<-- The enemy is to right or on top of the char
Trigger2 = Facing = 1 ;<-- And the helper is looking to the right
Trigger3 = NumEnemy > 1 ;<-- If there is more than one enemy
Trigger3 = Enemy(0),Pos X < Pos X ;<-- The first enemy is to the left
Trigger3 = Enemy(1),Pos X < Pos X ;<-- The second enemy is to the left
Trigger3 = Facing = -1
Trigger3 = NumEnemy > 1 ;<-- If there is more than one enemy
Trigger3 = Enemy(0),Pos X > Pos X ;<-- The first enemy is to the right
Trigger3 = Enemy(1),Pos X > Pos X ;<-- The second enemy is to the right
Trigger3 = Facing = 1
Trigger4 = NumEnemy > 1 ;<-- If there is more than one enemy
Trigger4 = Pos X = [Cond(Enemy(0),Pos X < Enemy(1),Pos X, Enemy(0),Pos X, Enemy(1),Pos X), Cond(Enemy(0),Pos X >= Enemy(1),Pos X, Enemy(0),Pos X, Enemy(1),Pos X)] ;<-- The helper is in the middle of the enemies
Trigger4 = Facing = 1 ;<-- Going left by default

[State Y, Lets walk]
Type = ChangeState
Trigger1 = !AnimTime
Value = Z


Now, the only thing left is to make the walking animation.

[StateDef Z]
Type = S
MoveType = I
Anim = 20 ;<-- Walking forward animation

[State Z, Velocity]
Type = VelSet
Trigger1 = 1
X = Const(Velocity.Walk.Fwd) ;<-- Walking speed

[State Z, End]
Type = DestroySelf
Trigger1 = FrontEdgeBodyDist <= -50 ;<-- Adjust this value until the helper is completely out of the screen


2) You will have to hit the enemy with an attack and send it to a Custom State inside your char, this way, you will have free control of what the enemy will do and he won't be able to escape from the grab.
To send the enemy to a Custom State, add P2StateNo = X to the HitDef and the enemy will go that state of your char.
Now, it is really important to use only the default sprites from the group 5000 on the animations for the enemy, if you use any sprite out of that group, the enemy may become invisble or use the incorrect sprite.
Also, if you want to use ChangeAnim, DON'T! Use ChangeAnim2, it is the same as ChangeAnim, but forces the enemy to use an animation from your char's .air.
In the end, use SelfState to send the enemy back to it's own .cns

3) To regen 1% HP every second, we will use a LifeAdd on state -2

[State -2, Regen]
Type = LifeAdd
Trigger1 = Alive ;<-- Make sure we only add life when the char is alive
Trigger1 = GameTime%60 = 0 ;<-- Triggers every second
Value = LifeMax * Cond(StateNo = X, 0.04, 0.01) ;<-- adds 4% of max hp if char is on state "X", 1% otherwise
Absolute = 1


Now, you will need to send the char to a state "X" when the player uses the command and, in this state, you will add a PowerAdd to fill the power bar.

[State X, Fill Power]
Type = PowerAdd
Trigger1 = GameTime%60 = 0
Value = PowerMax * 0.02 ;<-- adds 2% of max power


4) It is impossible in MUGEN...
MUGEN can use only 7 buttons for attacks, mapped by deffault to A S D Z X C Enter

Noctis

Thunderbert, it's preferred to lead them in the direction to solving their problem rather than giving them what they want. They won't learn anything this way. It would've taken much longer, but it's either that or they keep coming back asking for help every single time they hit a stump rather than figuring it out on their own...or at least attempting to. If they don't like it, that's not our problem.
Give a man a fish, he eats for a day. Teach him how to fish, he feeds himself for a lifetime.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

JustNoPoint

It all depends. If Cleverpony72 understands and absorbs the coding given to him he can still learn. If he just copy pastes then yeah.

Felkazz

That is why I try to comment everything, so they know what is happening in there, this way, they can learn too...

Noctis

I guess it's personal opinion then. I only post coding when it's something really, really simple and easily learned. Otherwise, I just thoroughly explain it with looooong posts. Sorry if I was dickish.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Odb718

Quote from: Noctis on September 18, 2015, 02:45:16 AMGive a man a fish, he eats for a day. Teach him how to fish, he feeds himself for a lifetime.
And then charge him for a fishing license!!

But seriously @[user id=86482]Cleverpony72[/user]: Ask 1 question at a time. Focus on getting that problem solved. A lot of times once you know how to do 1 thing, you'll find a million uses for it.
vVv Gouken718 vVv SabreTooth718 vVv


Cleverpony72

I do understand the information here, and I did read the tutorials and look up some other tutorials, too. That's why I didn't pop up and immediately ask how to make a face image splash screen appear, the kind seen in MvC.

I'd... kinda set out that character's attacks with the six buttons in mind. Is there a way to recode the buttons the game will accept? Or will I need to move certain attacks to other button combos?

Felkazz

I don't think there is a way to recode the buttons to accept 8 buttons unless you manage to hack the engine itself...
You'll need to move the attacks to other button combos =/

JustNoPoint

If you use a control pad or arcade stick you could just use xpadder to assign multiple key presses to a single button. Then just make some attacks using a combination of 2 buttons and it'd simulate 8 buttons just like you want.

Cleverpony72

I moved the attacks made by two buttons to a two-button combination at the start.

By the way, how do I make the kind of attack where you press a button, your character attacks, but if you follow it up with another button press, it'll do a dofferent attack? Like the two-hit and three-hit combos SSB characters can make using the standard A button.

Felkazz

Just like the other ones, but with an extra trigger
For example, if you have one attack that uses the command "a" and send the char to the state 200 and wants the char to go to state 210 when the player press "a" again, you can make the triggers in the CMD like this

Trigger1 = StateNo = 200
Trigger1 = Command = "a"
Trigger1 = Time > 20 ;<-- This one you will need to change according to the moment you want the combo to happen

You can also use other triggers instead of Time, like MoveContact, MoveHit, etc...

Cleverpony72

Excellent. For a different character, how do I make the MvC-style Splash Screen into something that can hit an opponent, smacking them with a 16-hit combo despite actually only hitting them once? This "Attack hits once, but counts as multiple hits according to the combo meter" coding will also be useful to my main character.

Also, I just found out that my mugen version is outdated. Where can I get a newer version? I googled it, but the official website looks down.

Felkazz

You can add NumHits = 16 to your hitdef, it will hit once, but will count as 16 hits ^^

For the Mugen, the current version is 1.1, I don't know what happened with Elecbyte's website... I can still access the Triggers and Sctrls docs trough direct link, but the website itself is down... But it is easy to find it to download from another source, just google "Mugen 1.1 download" ^^


Cleverpony72

Ok, good. This is mostly finished...

One of my characters will have a sword floating near him. I know there's coding to make a projectile face the way it's going, but can I use this to make this floating sword move properly? Also, if a certain button combo is used, the character becomes unable to use this floating sword, because the AI takes control of it, detaches it from the player, and aggressively pursues the foe while trying to repeatedly hit him. This floating sword is now a helper characrer.
2. Infinite double jumps. You know, since she can fly.
3. A certain button combination will send 108 very small feather-shaped projectiles out, only a few of these are likely to hit the foe unless they back up, and none will hit them if the foe dodges or block properly. (And the attacks will do 0 damage if blocked.) However, if you press C right afterwards, these projectiles home in on the foe, rather than spreading out touhou-style and looking cool. Also, this is a super.
4. An icicle is thrown at the foe. If blocked, foe is fine. If it hits, foe is stunned and frozen (and blue-palleted, if this can be done) for 0.8 seconds. (Or less, if this is too op.)
5. Hey, you know Rare Akuma? That Planet of the Apes-ish victory scene, where the foe appears on what looks like the moon... what is that song that plays in the background?
6. The Enter key will be his taunt key. If that can't be done, it'll be A+S. How do I code four taunts (depending on directional button pressed) that will also increase his power by half a super gauge when completed, but ONLY if he doesn't get hit while taunting? (If he gets hit when taunting, he'll either lose all power, or one power bar. Depends on how powerful this thing turns out to be, I'll have to playtest it.)
7. Who do I talk to if I want a character I'm making to have his own original theme, preferably metal/industrial metal/orchestral metal?
8. What are the best stages, characters, and themes in all of mugen? I have a MvC-accurate Ryu, Ken, Juri, M. Bison, Akuma, Cammy (She's my favourite of the Street Fighter girls. My favourite guy is either Ryu, Cody, or Vega.) And some others. I also have Iron Man, Venom, Captain America, Rare Akuma, Ms Fanservice (I don't get the joke, but it's still funny), Homer Simpson, and Ichigo Kurosaki.

Felkazz

1) This will be a bit complex...
You will have to code the sword as a Helper and make it follow the char... For the press a button part, you can use parent,command on the helper to detect the command being pressed by the player and you can use a ParentVarSet on the helper to set a var on the char to 1, using that var as a trigger so the char won't be able to use the sword while it is set to 1, you will also need to code the AI on the helper...

2)  This one is easy, just add this to the state 50 (in the common)

[State 50, Infinity Air Jump]
Type = ChangeState
Trigger1 = Command = "up"
Value = 45 ;<-- This is the AirJump state in the common

If your char does not have a common cns, add this to state -1 (CMD)

[State -1, Infinity Air Jump]
Type = ChangeState
Trigger1 = Command = "up"
Trigger1 = StateNo = 50 ;<-- The char must be jumping to AirJump
Value = 45


3) You'll want to code the projectiles as helpers, and send them on random angle, and they will change their behavior when detecting the character input, just like I said in answer "1"

4) I did this once, I can tell you two ways to do this:
4.1) Just use a high hitpause on the enemy in the HitDef, knowing that every tick is 1/60 of a second, so, to freeze the enemy for 0.8 seconds, use 48 and you can apply PalFX on the enemy on the HitDef too, just look at the Mugen Docs
4.2) This is the way I did it, because it allows for better control of the enemy. Just send the enemy to a custom state and control it there, if you want to analize this method, you can check my Lucario (for MUGEN 1.0, will bug on 1.1 if the stage has zoom), you can download it on my website (check my profile) and, even though my website is in portuguese, it shouldn't be hard for you to find it... The frozen effect is done by the Weavile helpers and their states is from 8030 to 8035.

6) You can use it for the taunt, just use the command "s" as trigger on the cmd to send the char to the taunt state, you can also use other commands to go to a different taunt

trigger1 = command = "s"
trigger1 = command = "fwd"


Sorry, but I can't help with the other questions =/

Cleverpony72

Thanks! I'm almost finished with this.

1. Is there a limit to how many helpers a character can have? Because he's starting to get a lot of helper characters.
2. I'm making an attack where ten lasers appear and swing around across the stage, like the attack Master Hand from the Smash Bros series has. But... do I have to create the hitboxes for each frame, or is there a better way of doing this? The official Mugen guide docs imply that it's a bad idea to have too many hitboxes on a character. But, with those thin lasers moving around, there will be many hitboxes. Is there a better way of doing this?
3. How do I cause an attack to have a status debuff, lowering the foe's attack power, max health, defense, and speed for ten seconds?
4. While in the air, I'd like my character to have similar/the same attacks to what he has on the ground. Is there a trick for this?
5. During the intro stage, I'd like a certain character to detect whether or not he's facing a certain character with a certain filename. If he is, then he pauses the game, and a bunch of flowers bloom (I have the animation for this) around the screen, and the foe collapses. And then a large metal cube slams down onto the foe, and the game counts it as a K.O. I've seen characters initiate instakills or enter super godmodes upon detecting cheap characters, but... not one with a custom "I detected a certain character, and I'll do this to defeat it" attack.
6. There's a character named Giygas. How do I make a character capable of defeating it?

Felkazz

1) Yes, there is, but not for a char, MUGEN 1.1 allows for a total of 56 helpers existing at the same time, counting helpers from every char that is in the battle.

2) If I understood it correctly, you already have the animation for the lasers, so yes, you will have to add a lot of hitboxes on it... The only way I know to reduce the amount of hitboxes in this case, is to spawn helpers from time to time that goes in the direction the laser is pointing (I also did this in my Lucario, he has a super where the player can control the direction of his Aura Storm, if you want to check it, look from state 2000 to 2005 and from 2100 to 2104)

3) I don't think it is possible outside of a full game...

4) Just use Trigger1 = StateType != C instead of Trigger1 = StateType = S. You'll also need to add StateTypeSet to change the Type of the State to Air and modify the final ChangeState.

[State 200, I am in the air]
Type = StateTypeSet
Trigger1 = Pos Y < 0 ;<-- If the char is in the air
Trigger1 = StateType != A ;<--And the StateType is not of an Air state
StateType = A ;<-- Set it to Air

[State 200, End]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = Cond(Pos Y < 0, 50, 0) ;<-- If the char is in the air, go to state 50, otherwise, go to state 0
Ctrl = 1


5) You can't detect the enemy by its filename, but you can detect it by its name (usually different from DisplayName), using the trigger redirection Enemy, you can use Enemy,Name = "Name" to detect it... Then, you can send your char to a state with SuperPause to pause the game and send an attack that kills the enemy. I guess you want to detect cheap chars and kill them xD

6) I have no idea xD

Cleverpony72

Okay, cool. But how do I make sure this instakill-attack can't be performed by a cheating player or a cheating AI?