YesNoOk
avatar

Move Triggers on Miss and Continues Forever (Read 279 times)

Started by MUGENforever, July 05, 2010, 10:25:15 pm
Share this topic:
Move Triggers on Miss and Continues Forever
#1  July 05, 2010, 10:25:15 pm
  • avatar
  • ***
Sorry about the load of questions, but I haven't coded in a very long time. I tried adding MoveHit and MoveContact triggers, but I'm eitehr doing it wrong, or it's not what's needed to fix the problem. The problem is with this attack the charact continues on to do the attack after the initial part misses and continues to do it forever. I marked the spot that I tried adjusting if you scroll down in the code a bit you will see it. It's marked with *'s. Made the code spoiler so easier to read.

Spoiler, click to toggle visibilty
Last Edit: July 06, 2010, 12:32:27 am by MUGENforever
Re: Move Triggers on Miss and Continues Forever
#2  July 05, 2010, 10:48:24 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I can't run through that, it's too difficult to read with no spaces and explods and playsnds crammed all through it.

I think your problem is variable related. According to the code going to 6704 is going to happen regardless because it's triggers are less restrictive than the rest. But that doesn't tell me why it "just keeps going" turn on debug and check what states you're actually in.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Move Triggers on Miss and Continues Forever
#3  July 05, 2010, 11:22:06 pm
  • avatar
  • ***
She switches between state 6714 and 6715 which is the grab wall and the atk states. Here is a video of what happens and a zoom of the debug area with the state and other info at 20 sec.

http://www.youtube.com/watch?v=NLDSPvl6EXM
Re: Move Triggers on Miss and Continues Forever
#4  July 06, 2010, 03:35:41 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Well i wish you'd just posted those 2 and removed everything that had no bearing at all. A playsnd doesn't stop anything but it DOES make it harder to read. Anyway

Quote
[State 6715, 13.3]
type = ChangeState
trigger1 = Time > 0 && FrontEdgeBodyDist < 20
value = 6714
ctrl = 0
Is the problem changestate. See if you can get her to hit well away from the front wall and see what happens. Cos right now that's just reading 6714>anim complete>6715>too close>6714 over and over.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Move Triggers on Miss and Continues Forever
#5  July 06, 2010, 06:24:54 am
  • avatar
  • ***
I probably shoulda made the other character move around in the first video. But she continues one regardless of which wall she grabs. She also hits state 60730 when she grabs the floor but thats all it is is just the floor grab. Here is the second video with her grabing multiple walls far and close.

http://www.youtube.com/watch?v=p2r8i6zc2fI

I created a MoveHit trigger that stops her from continuing when she misses in state 6715, but it also made her stop attacking in the middle if she missed once when she is supposed to continue to the end. So I deleted it.

I alo tried one at the begining instate 6702, but she would just stop after she initially jumps up to grab the wall.
Last Edit: July 06, 2010, 06:29:01 am by MUGENforever
Re: Move Triggers on Miss and Continues Forever
#6  July 06, 2010, 08:47:22 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Pretty much what i said then. She's being told to do that.

Quote
value = ifelse(Var(35) = 0,6705,50)
ctrl = ifelse(Var(35) = 0,0,1)
You initialise var(35) to 0. You never set it again after this point. Ever. So it's just continue going to state 6705. That's all there is to it.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Move Triggers on Miss and Continues Forever
New #7  July 08, 2010, 01:21:52 am
  • avatar
  • ***
[State 6705, 12.1]
type = VarSet
trigger1 = HitCount = 0
v = 35
value = 1

[State 6705, 12.2]
type = ChangeState
trigger1 = var(35) = 1
value = 6740

So I tried multiple lines with movecontact and movehit and so forth. I cant use movecontact/movehit because it will make her stop the attack if she misses at any portion so I figured Hitcount would be the best. It works in making her stop after shes misses, but when she hits, after the first hit she flies up for the second hit and once she hits, she just stops the attack. So now I'm lost why she does that?? After the first hit, the hitcount cannot be zero so it should never trigger this and cause it to stop.

Tried adding it to grab phase, she just stops after the first hit when she grabs the wall or ground or whatever.

Set hitcounterpersist = 1 for state 6705 and the floor/wall/top grabs, still doing same thing.


Got it to work: Had to add is to state 6715, create hitcounpersist, and increase the variable change to a larger number. It doesn't stop after the first attack, it attacks a second time which can't connect, but it will stop after that try which seems good.

[State 6715, 12.1]
type = VarSet
trigger1 = HitCount = 0
v = 35
value = 23

[State 6715, 12.2]
type = ChangeState
trigger1 = var(35) = 23
value = 6740

Gotta thank you for your help   :sugoi:
Last Edit: July 08, 2010, 02:15:39 am by MUGENforever