collapse

Author Topic: Avoid get stuck on custom states  (Read 2017 times)

0 Members and 2 Guests are viewing this topic.

Offline O Ilusionista

  • Since 1999 and kicking :)
  • IMT Content Architect
  • *
  • Posts: 12476
  • Country: Brazil br
  • Last Login:November 11, 2024, 12:35:15 PM
  • OpenBOR & Mugen addicted
    • BMT - Brazil Mugen Team
    • Email
Avoid get stuck on custom states
« on: January 24, 2011, 04:27:00 PM »
Hi there.

I will show a method to now get stuck in custom states on simul modes on Mugen (all versions)

Quoting POTS:

Quote
P2stateno

There's this elusive Mugen bug where if a helper (or possibly player 3/4) hits you in the exact same moment you connect with a throw, your character will be hit out of it but your target will still be sent to custom states and (usually) get stuck there.  To solve this simply forget that the p2stateno Hitdef parameter exists and get used to TargetState instead.

To achieve the same effect as P2stateno in throws, you can keep using P1stateno then use TargetState when the character starts throwing.

The use of TargetState is valid, but is a workaround of something that people does wrong.

This happens because many creators are lazy (including me sometimes, hehe). The make this works well requires that you pay attention with some things you probabily make in another way.

I will explain why:

- When you use TargetBind you should especify a time that this bind will still occour, many creators just ignore this.

Code: [Select]
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElem = 2 ; <-change for what suits you
time = 10 ;<- THIS
...

Lets take this animation as an example:

Code: [Select]
[Begin Action 1]
Clsn2Default: 1
  Clsn2[0] = -1, -79, 21, -47
0,0, 0,0, 3,
0,1, 0,0, 10,
0,2, 0,0, 3,
0,3, 0,0, 3,

Pay attention at the 2nd element of the anim above. It last 10 ticks.
So, if p2 will be bound at the same position during the 2nd element, it needs to be bound at the same place for the same ammount of time.

Most of times, on the 3rd elem, the target will be bound in another position. If you still need the p2 bound at the same position at the 3rd elem (taking the anim above as example), you will need to change the time to the duration of the 2nd and 3rd elements - 13 ticks.

Maybe you're thiking that this is useless, but try to use a char without this bindtime on stages which the ground moves up and down - POTS Skies over Aengmore is a good example. You will notice that the p2 doesn't get bound to the right position, because it doesn't "follow" your char. To see it fully, you need a char which binds p2 at the same position for a good amount of time, you will won't notice very much.

Then, doing this, you simply use a single trigger on the custom state, which many creators forgets even that it exists:

IsBound

Code: [Select]
[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound) ;<- THIS
value = 5050

Quote
isbound: True if the player is the subject of an attacker's
               TargetBind controller. Useful to prevent being stuck in
              thrown states. (int)

Using this, if you put p2 on a custom state but you're hitted at the same time, that trigger will make p2 fall and to not get stuck.

What bindtime and isbound has in common?

Its simple: if p2 is on a custom state for a time greater than normal (for example, when p1 is hitted while grab), p2 will fall on the ground.
And if don't put the bindtime and use the isbound trigger, p2 will fall at the next tick you hit him, because the bindtime default is 1 and, on the next tick (2), it isn't bound anymore, so the grab will fail.

I hope that people can understand my poor english :)



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