collapse

Author Topic: Super Armor Video?  (Read 978 times)

0 Members and 1 Guest are viewing this topic.

Offline darkgeist

  • Initiate
  • **
  • Posts: 83
  • Last Login:September 06, 2024, 03:28:00 AM
    • Email
Super Armor Video?
« on: July 10, 2015, 05:28:29 PM »
Is there a video out there on the internetz that shows how to properly implement Super Armor into a character? I've been all over the web looking at codes and I could never fully understand it. Would anyone be willing to make a video tutorial? maybe showcasing it in one state? :-??



Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Super Armor Video?
« Reply #1 on: July 13, 2015, 04:58:33 AM »
Super armour is just a way of taking hits and maintaining your previous state. Here's a terrible version

[Statedef 1000]
type = S
movetype = A
physics = S
ctrl = 0

; Note, i have left out both velset AND anim they shouldn't be used.
;This is what we use to set the anim for the state Note that it doesn't change unless the anim is ;different from the one we want
[State Changeanim]
type = changeanim
trigger1 = time = 0 && anim != 1000
value = 1000

;This is the bit that sends you off to a special "hitstate" when you take a punch
[State HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA    ;Applies to all hits, ever
stateno = 1001    ;This is the special hitstate

;For the heck of it, here is a velset we want in the state
[state Velset]
type = velset
trigger1 = animelemtime(3) = [5,20]
x = 4
;Note that i have used animtime and have given it a specific range to occur in. Only the 3rd ;frame, and only for 15 ticks from that point. Time would not give the results we want. ;Actually, even this might need tweaking

[State Changestate]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;And this is the hitstate. It's really simple
[Statedef 1001]
type = U ;This means Unchanged
movetype = H ;This makes us take damage
physics = U

;This locks the animation
[State Changeanim]
type = changeanim
trigger1 = hitshakeover = 0   ;Still shaking from hit.
value = anim ;Maintain current anim
elem = animelemno(0)   ;Maintain current frame, this means the frame to be displayed in 0 ;ticks, ie the one we're on

[State ChangeState]
type = Changestate
trigger1 = hitshakeover = 1 ; Done shaking from the hit
value = prevstateno ;Return to previous state

The beauty is that you can reuse that hitstate for anything and everything that requires super armour (although you might want to set up something else for aerial hits). The only issue with it is you become immune to throws/custom states, even though most people are aware of that limitation. You do run into issues when you change back because it does technically start the animation a second time, even when locking the current animelem, it'll start you at the beginning of it again. You can if you wish use variables to memorise both the anim and the frame of all states and remember them from that. You can also use a timer variable inside your attacking states and use that to time out when things should happen. When the character is in the hitstate the var doesn't increase, so it can continue where it left off. Good for stuff like sparks that require precise timing. But that's the basics, you will get a super armour effect from the above.

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

D2TD VS Showcase Thread by D2TD
[Today at 09:12:03 AM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by LightFlare
[November 21, 2024, 09:44:09 PM]


Terrordrome: Rise of the Boogeymen Extended Version ( jeepers creepers) version by leonardo
[November 19, 2024, 10:22:47 PM]


Hill of the Nameless(1.1 Only) by Vegaz by LightFlare
[November 19, 2024, 10:50:39 AM]


Golden Axe Returns by gokudo99
[November 19, 2024, 03:59:31 AM]


Barkley Shut Up and Jam! Stages by Vegaz by LightFlare
[November 12, 2024, 11:26:21 AM]


[BOR] _Avengers United Battle Force_ by O Ilusionista
[November 11, 2024, 12:35:24 PM]


Eternal Lament Stage 1.1 & 1.0 by O Ilusionista
[November 11, 2024, 12:34:54 PM]


MatreroG's Stages W.I.P. Concepts by MatreroG
[November 11, 2024, 07:00:56 AM]


Spooky House(1.1 Only/AIGS) by Vegaz by LightFlare
[October 31, 2024, 11:31:36 AM]

* IMT Calendar

November 2024
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
[24] 25 26 27 28 29 30

SimplePortal 2.3.5 © 2008-2012, SimplePortal