collapse

Author Topic: simultaneous hit collision bug problem P1 & enemy  (Read 1661 times)

0 Members and 1 Guest are viewing this topic.

Offline DEMONKAI

  • The Visionary and IMT's
  • Contributor
  • ****
  • Posts: 8335
  • Country: United States us
  • Last Login:October 11, 2022, 09:44:18 PM
  • Never limit your vision as a creator!!
    • DTHECHEMIST
    • D THE CHEMIST
    • Demonkai's Mugen
simultaneous hit collision bug problem P1 & enemy
« on: January 24, 2014, 11:02:48 PM »
Iva had this issue for a hot while now and ive been trying to find ways to deal with it bug but no dice...

Its an elusive bug that happens just as the enemy is hitting my character as hes hitting them with the power tackle takedown move. MY character staggers back but the enemy is stunned completely in a lie down state. I read by chance Pots speaking on this same kind of bug and it was for regular throws. i assumed this would work for my move since technically it is a throw move also.

The bug highly happens versus pots vega since he seems to always make this happen

Anway Heres the code he posted to solve such an issue

(I really dont have a strategy right now on how i can use that maybe. IF i can)
[State 800, Hit]
type=hitdef
(...)
p1stateno= 810

[State 810, Throw]
type= targetstate
trigger1= !time && numtarget
value= 815



heres my code here:



FIRST PART (initial run)
(click to show/hide)

SECOND PART (state if he misses)
(click to show/hide)


3RD PART (state for hit def of take down)
(click to show/hide)

(Btw this an old code i used as a base to build from that was in a KOF Ralf i had since i wanted the same kind of attack)

currently i will be chipping at the issue while i wait on a reply


EDIT:

I think i fixed it. its not happening anymore.

solution?:

Well i read a lil further down in pots thread and saw Cyanide post this "Although target state is far better, priority = 4,miss in the hitdef itself would also prevent that"

I got curious and added that in my hit def and it seemed to kill the bug....i hope it did at least. I kept making my character clash with vega with that move the instant he attacked and it wasnt happening anymore so maybe that did it :-??

Well if anyone still wants to post opinions on solutions please do so. Im all ears on stuff i can learn. just in case the bug shows up again i dont mind having alternate solutions. Ill keep testing him against that Vega to see what turns up in a good half HR^^
« Last Edit: January 26, 2014, 06:12:12 PM by DEMONKAI »


Lots and lots of supers so f*ckin what

HAIL CROM!!

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: simultaneous hit collision bug problem P1 & enemy
« Reply #1 on: January 25, 2014, 03:12:03 AM »
Aside from miss which you've added.

It's always good to have an "out" in custom get hits using selfstate. For example if you KNOW your character will do something else within a second but the character is still in a specific custom state beyond that point, have them leave it. Taking your example. Character doesn't sound like they are targetbound. So you do

[State Selfstate]
type = selfstate
trigger1 = time > 60
value = 5120
ctrl = 0

Sending them back to getup after they have been lying down for 60 ticks. You should always provide some sort of "out" for your opponent to prevent bugs.

Also this is bad
pausetime= ifelse(var(20),0,0), ifelse(var(20),0,0)

That does nothing whatsoever.

Offline DEMONKAI

  • The Visionary and IMT's
  • Contributor
  • ****
  • Posts: 8335
  • Country: United States us
  • Last Login:October 11, 2022, 09:44:18 PM
  • Never limit your vision as a creator!!
    • DTHECHEMIST
    • D THE CHEMIST
    • Demonkai's Mugen
Re: simultaneous hit collision bug problem P1 & enemy
« Reply #2 on: January 25, 2014, 04:13:43 AM »
Good stuff here. thanks for the tip. yeah im looking the code over again a bit. but overall the bug stopped happening since i put that "miss" in there
Lots and lots of supers so f*ckin what

HAIL CROM!!

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: simultaneous hit collision bug problem P1 & enemy
« Reply #3 on: January 25, 2014, 04:18:17 AM »
Best to do it regardless of whether it's fixed or whether the attack worked. You never know when something else might happen. For example, you hit p2 but a helper hits you. That would have the same effect.

Offline DEMONKAI

  • The Visionary and IMT's
  • Contributor
  • ****
  • Posts: 8335
  • Country: United States us
  • Last Login:October 11, 2022, 09:44:18 PM
  • Never limit your vision as a creator!!
    • DTHECHEMIST
    • D THE CHEMIST
    • Demonkai's Mugen
Re: simultaneous hit collision bug problem P1 & enemy
« Reply #4 on: January 25, 2014, 10:01:07 PM »
I agree with you. i put that code in there before i went to bed last night...well to be more clear on what i did i rather show you...just let me know if that was a good place to put it....I assumed this is where its supposed to be


(click to show/hide)


Nothing bad or weird happened after i did that. code seemed to fit fine there^^

EDIT:

Nevermind. something bad did happen when i added that there. i noticed it when i killed my own character with the move. i was testing it on other characters and didnt see it. when he died he got back up again. eh thats fine, i changed it back but ill wait to see what you say on where that should have been placed. sometimes i fix and break codes i made at the same time forgetting what i did before.

« Last Edit: January 25, 2014, 10:26:50 PM by DEMONKAI »
Lots and lots of supers so f*ckin what

HAIL CROM!!

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: simultaneous hit collision bug problem P1 & enemy
« Reply #5 on: January 26, 2014, 12:13:01 AM »
I gave you an example, not a copy-pasta...

There was nothing wrong with the old selfstate. Put it back and delete what you copied in.

Not that the state you've posted doesn't have issues. Shall we try fixing those?

Quote
[State 3053, ChangeAnim]
type = ChangeAnim
trigger1 = time < 47
trigger1 = !SelfAnimExist(5161)
value =5080
Time less than 47 and anim 5161 doesn't exist, go to anim 5080. No problems there. That's fine

Quote
[State 3053, ChangeAnim]
type = ChangeAnim
trigger1 = SelfAnimExist(5101)
trigger1 = SelfAnimExist(5161)
trigger1 = Time < 50
value = 5080
Time less than 50, so same as above basically, and if both those anims DO exist, go to animation 5080, so, the same as the code above except instead of "do this if this isn't there" it's saying "do this if that thing that wasn't there is, btw it's the same thing you did before"

Quote
[State 3053, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 47;51
trigger1 = anim = 5101
value = 5101
Then we have this, which does nothing. If time = 47 (when we're leaving the state) go to anim 5101 but only if we're already in anim 5101.

All your code looks at anim 5080. It may as well simply be
Quote
[State 3053, ChangeAnim]
type = ChangeAnim
trigger1 = time < 47
value =5080
And leave the rest out. I can see how you're getting snarled up if you just leave old code in place and never clean it out. I mean, none of this will BREAK anything, but none of it is truly doing anything so it doesn't need to even be there.

Offline DEMONKAI

  • The Visionary and IMT's
  • Contributor
  • ****
  • Posts: 8335
  • Country: United States us
  • Last Login:October 11, 2022, 09:44:18 PM
  • Never limit your vision as a creator!!
    • DTHECHEMIST
    • D THE CHEMIST
    • Demonkai's Mugen
Re: simultaneous hit collision bug problem P1 & enemy
« Reply #6 on: January 26, 2014, 12:24:32 AM »
Got you. totally understand. yeah that code as i said was from another character Ralph KOF and it worked as is so i didnt want to complicate things more at the time by taking chances and removing it since its serving its purpose sorta for the similar attack i wanted.

But anyway now that you have confirmed its fine to remove it ill listen,simplify the code and get the rest out of there.

Thanks for the clear breakdown of that.
Lots and lots of supers so f*ckin what

HAIL CROM!!

Offline Sabaki

  • Theory Coder
  • IMT Content Architect
  • *
  • Posts: 2489
  • Country: United States us
  • Last Login:December 28, 2014, 03:28:33 AM
  • Busy, as always
    • Wikipedia - Sabaki's Page
Re: simultaneous hit collision bug problem P1 & enemy
« Reply #7 on: January 26, 2014, 06:02:28 PM »
This is a problem I've seen for the longest and struggled to resolve with different tricks myself. Lately I've been successful, similar to how Cyanide explained it. Two points that should be taken into account are 1) getting your player to stop the throw sequence if the opponent isn't in the target state, and 2) making the opponent to get out of the target state in case your character isn't in the throw state (or, the state that puts the opponent into the target state) anymore.

Looking at the 1st point, you can use a time to have your character quickly get back into, let's say stateno = 0 & ctrl = 1 so not to break up the flow of the fight. Using your example, let's say that in stateno 800, we use the same hitdef, but also add a p2stateno for the opponent.

[State 800, Hit]
type=hitdef
(...)
p1stateno= 805
p2stateno = 810

Now, let's say that under normal conditions, when this move connects, your character goes into stateno 805 & completes the full attack/throw animation from there. However, when you are attacked by the opponent while in state 800 and both hit at the same time, the opponent does not go into stateno = 810 (but goes into a regular gethit state, such as 5000, 5010, etc), yet you proceed to state 805. You can add this to state 805:

[State 805, State Cancel]
type = ChangeState
trigger1 = Time >= 5 && p2stateno != 810
value = 0
ctrl = 1

The time can be changed to any value you like, but preferably it should not be smaller than 5 imho. Also, you can change trigger1 to this:

trigger1 = Time >= 5 && p2stateno = [5000,5110]

While this too works, it should be relation to how your character's move works and doesn't accidentally interrupt the move if it successfully connects. This cancel changestate can be used even for moves that have multiple states, so if your character goes into another sequence for the move in stateno = 806, you can still add this cancel changestate in state 805, as well as 806 (if necessary).

Now for point 2, pretty similar to what's written above, but most importantly you have to use a selfstate and not a changestate; if you use the latter then the opponent will not be able to attack until hit. So, in state 810, you can add something like this:

[State 810, SelfState]
type = SelfState
trigger1 = time > 5 && enemynear, movetype = H (enemynear is your character)
value = 0
ctrl = 1

Have the opponent go into the correct stateno based on whether he/she is on the ground, in the air, etc. You can be creative and experiment with other tricks, but be sure that they match the situation and don't "break " either characters.

Oh, and in regards to that point where you said your character died but got back up, if characters are put into a custom state that can kill them, it's best to have a failsafe and use coding that have them go to, say state 5110 if they are still alive, or state 5150 if their life = 0 during the custom state. You can write this with 2 changestates (selfstates for the opponent), 1 changestate/selfstate with a ifelse to switch between the appropriate stateno, etc.

Just my two cents.


Offline DEMONKAI

  • The Visionary and IMT's
  • Contributor
  • ****
  • Posts: 8335
  • Country: United States us
  • Last Login:October 11, 2022, 09:44:18 PM
  • Never limit your vision as a creator!!
    • DTHECHEMIST
    • D THE CHEMIST
    • Demonkai's Mugen
Re: simultaneous hit collision bug problem P1 & enemy
« Reply #8 on: January 26, 2014, 06:11:42 PM »
Thanks on your breakdown as well. issue is fine now since what cyanide posted but reading through this also was good for me to know for new projects. that bug was elusive as hell^^
Lots and lots of supers so f*ckin what

HAIL CROM!!

Offline Sabaki

  • Theory Coder
  • IMT Content Architect
  • *
  • Posts: 2489
  • Country: United States us
  • Last Login:December 28, 2014, 03:28:33 AM
  • Busy, as always
    • Wikipedia - Sabaki's Page
Re: simultaneous hit collision bug problem P1 & enemy
« Reply #9 on: January 26, 2014, 06:21:25 PM »
Np  :thumbsup: . Figured it's been resolved, but when I read your 1st post it brought back (head-banging & painstaking) memories when I would encounter this situations myself. Just felt like sharing some of the points I came across to deal with this.
« Last Edit: January 26, 2014, 07:40:24 PM by Sabaki »

Offline DEMONKAI

  • The Visionary and IMT's
  • Contributor
  • ****
  • Posts: 8335
  • Country: United States us
  • Last Login:October 11, 2022, 09:44:18 PM
  • Never limit your vision as a creator!!
    • DTHECHEMIST
    • D THE CHEMIST
    • Demonkai's Mugen
Re: simultaneous hit collision bug problem P1 & enemy
« Reply #10 on: January 26, 2014, 06:38:25 PM »
And its well appreciated man  ;) annoying situation i had for a hot while. got tired of seeing it happen

Its tricky for me at times to spot bugs because it may happen in one character but wont in another. isolated bugs that are elusive are the worst
Lots and lots of supers so f*ckin what

HAIL CROM!!

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
[November 24, 2024, 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