collapse

Author Topic: Command Limiter  (Read 953 times)

0 Members and 2 Guests are viewing this topic.

Offline AxKeeper

  • Contributor
  • ****
  • Posts: 165
  • Last Login:February 16, 2016, 08:44:04 PM
  • What? You want credit? Debit or Mastercard? :P
    • Mugen Multiverse
Command Limiter
« on: May 04, 2012, 03:33:20 PM »
Okay so I need help in this
 
; air jump
[State -1, jump]
type = ChangeState
value = 40
trigger1 = command = "b"
triggerall = command != "holddown"
triggerall = statetype = A
trigger1 = ctrl

I just need it to work 1 time and then disable after its been done to prevent from jumping up with an unlimited ability.

Also

Is there a way to disable the directional jump button in mugen? This one is a real brain teaser because you have to give it a command and if you leave it blank or erase it completely mugen will crash because it's required.



;-| Tap |-----------------------------------------------------------
[Command]
name="fwd"
command=F
time=1
[Command]
name="back"
command=B
time=1

[Command]
name="up"
command=U

time=1
[Command]
name="down"
command=D
time=1
Modify message
Report to moderator   66.27.221.124


"Aren't they already committing a bigger crime by stealing from gaming companies to begin with? Silly goose" :D

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Command Limiter
« Reply #1 on: May 04, 2012, 06:23:46 PM »
Didn't this get answered at guild? Use a variable to define whether you have jumped or not. Set it back to 0 when statetype = S

For the second one you have to override state 40 to send you back to state 0 and use a DIFFERENT starter state to make you jump. So your changestate would send you to a clone of state 40 like say... 41.

State 40 would send you straight back to 0 and include nothing but a changestate.

Offline AxKeeper

  • Contributor
  • ****
  • Posts: 165
  • Last Login:February 16, 2016, 08:44:04 PM
  • What? You want credit? Debit or Mastercard? :P
    • Mugen Multiverse
Re: Command Limiter
« Reply #2 on: May 04, 2012, 08:20:12 PM »
I am banned at Mugen guild so I couldn't have posted this there.

I set a varset and made the trigger = statetpe = S

But it has no effect on the jump?


Also wouldn't it be easier if maybe I could do some kind of time parameter that  would allow me to do it again in like 10 mins after the first one so I couldn't do it again that way?

"Aren't they already committing a bigger crime by stealing from gaming companies to begin with? Silly goose" :D

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Command Limiter
« Reply #3 on: May 04, 2012, 10:35:01 PM »
Oh right, the nazi thing.

You use the varset when you air jump the first time. Your command then requires that variable to be 0 in order to use it a second time.

Being statetype != A means you'll be on the ground again so it should reset to 0.

You want to limit it by time? Despite the fact you may wish to use it again within the next second and be unable to? No, terrible idea.

Offline AxKeeper

  • Contributor
  • ****
  • Posts: 165
  • Last Login:February 16, 2016, 08:44:04 PM
  • What? You want credit? Debit or Mastercard? :P
    • Mugen Multiverse
Re: Command Limiter
« Reply #4 on: May 05, 2012, 02:31:23 PM »
Well it works now but I have an error message that says "Changed to Invalid State...."

Of the new action duplicate I made of the jumping.

It works though, i guess that's what matters but I know I am gonna get lip about "debug flood"



Any idea how to disable the directional up command for jumping?
"Aren't they already committing a bigger crime by stealing from gaming companies to begin with? Silly goose" :D

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Command Limiter
« Reply #5 on: May 05, 2012, 11:17:24 PM »
You can't it's hardcoded. You need to work around it.

Offline AxKeeper

  • Contributor
  • ****
  • Posts: 165
  • Last Login:February 16, 2016, 08:44:04 PM
  • What? You want credit? Debit or Mastercard? :P
    • Mugen Multiverse
Re: Command Limiter
« Reply #6 on: May 06, 2012, 12:32:08 AM »
You can't it's hardcoded. You need to work around it.

Okay so you're saying like modify the jump state to not jump very much or at all so it is practically standing, regardless if up is pushed and make a custom regular jump state and then use that?

Will that work at all? Or will the hard coded thing still take effect and make it uncodable?
"Aren't they already committing a bigger crime by stealing from gaming companies to begin with? Silly goose" :D

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Command Limiter
« Reply #7 on: May 07, 2012, 02:12:49 AM »
You edit state 40 in such a way that it instantly puts you back to state 0 without changing animation or anything like that.

You create a duplicate of state 40 that your new key can send you to. That then takes the place of jumpstart.

Offline AxKeeper

  • Contributor
  • ****
  • Posts: 165
  • Last Login:February 16, 2016, 08:44:04 PM
  • What? You want credit? Debit or Mastercard? :P
    • Mugen Multiverse
Re: Command Limiter
« Reply #8 on: May 07, 2012, 03:24:49 AM »
Okay new problem, can you create a do nothing state for statedef 40?

It seems he continues to keep walking or freezes in animation, Iv'e kept modifying the code but it still moves or looks weird?

; Jump Start
[Statedef 40]
type    = S
physics = S
sprpriority = 0

[State 0, 1]
type = ChangeAnim
triggerall = life > (lifemax/4)
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 1]
type = ChangeAnim
triggerall = life <= (lifemax/4)
trigger1 = Anim != 1 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 1

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21


[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0





;------------------
"Aren't they already committing a bigger crime by stealing from gaming companies to begin with? Silly goose" :D

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Command Limiter
« Reply #9 on: May 07, 2012, 03:45:02 AM »
That's not what i told you to do. You've turned state 40 into state 20. ALL you should have is a changestate. You want a "do nothing" state that sends you back where you were without touching animation. Here i'll write it

[statedef 40]
type = U
movetype = I
physics = U
ctrl = 1

[State Changestate]
type = changestate
trigger1 = 1
value = prevstateno

That's all it should have. Before you wipe it create a back up and label it with a DIFFERENT number.

Offline AxKeeper

  • Contributor
  • ****
  • Posts: 165
  • Last Login:February 16, 2016, 08:44:04 PM
  • What? You want credit? Debit or Mastercard? :P
    • Mugen Multiverse
Re: Command Limiter
« Reply #10 on: May 07, 2012, 03:50:31 AM »
Sorry but it stays in an idle animation if you hold up while standing still.

I tried this however and it works fine.

; Jump Start
[Statedef 40]
type    = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21


[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

It has a small delay but it works good enough.
"Aren't they already committing a bigger crime by stealing from gaming companies to begin with? Silly goose" :D

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Command Limiter
« Reply #11 on: May 07, 2012, 04:04:11 AM »
You want up to = walk? That's what you've coded. That's not what you've been saying. You wanted up to do nothing. I've given you that. You've in fact confirmed that that's what it does. You have changed that into wanting up to be walk. If you had said that in the first place it's what i would have given you.

Offline AxKeeper

  • Contributor
  • ****
  • Posts: 165
  • Last Login:February 16, 2016, 08:44:04 PM
  • What? You want credit? Debit or Mastercard? :P
    • Mugen Multiverse
Re: Command Limiter
« Reply #12 on: May 07, 2012, 04:42:59 AM »
Well I just don't want up to jump, instead I wanted a command button like "B" to do my jumping, but the problem persists in another form, because when you move using directionals you will no doubt accidentally hit the up command and cause an error in the walking, such as standing still,even though you are holding forward.

If a jump is to be done then the former jump directional up can't stop you in the middle of moving just to do nothing. You will need some kind of control when you jump so and the directional up shouldn't be able to interfere with that kind of set up. 

Anyway it works now. Using up won't interfere with anything else. It will do nothing for real now without interfering with anything else.
"Aren't they already committing a bigger crime by stealing from gaming companies to begin with? Silly goose" :D

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Command Limiter
« Reply #13 on: May 07, 2012, 04:24:06 PM »
Fine then, mine should have done completely the same thing. It had no velocity set so you would not stop. Physics were unchanged and would be retained. It had no animation set (unlike yours) so that wouldn't start/restart. And it sent you back to prevstateno (0 if standing 20 if walking) Reading what you have put in there, you should get a walk cycle every time you press up even though you're standing in one place.

Offline AxKeeper

  • Contributor
  • ****
  • Posts: 165
  • Last Login:February 16, 2016, 08:44:04 PM
  • What? You want credit? Debit or Mastercard? :P
    • Mugen Multiverse
Re: Command Limiter
« Reply #14 on: May 07, 2012, 04:38:08 PM »
What you mentioned was true about the animation cycle but I tried yours exactly and it had some problems.

I appreciate the help and the advice so please don't get offended, I disagree with your results, I've tried that last bit and it didn't work so well for me. No big deal. I hope you don't black list me for assistance. k thx.  #:-S
"Aren't they already committing a bigger crime by stealing from gaming companies to begin with? Silly goose" :D

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Command Limiter
« Reply #15 on: May 08, 2012, 04:19:14 AM »
What mine SHOULD have done was leave you in whatever animation you were in and simply send you straight back to the state you were in before you got there. I would be very interested in what it did do, because if it was restarting animations (when i had none set) you have played with other things.

Read through it. No animation is set, physics are maintained, you have ctrl and you return to the previous state number on the equivalent of time = 0.

Yours, as you have just found out, cycles the walk anim which is... pretty terrible really. Show me states 0-40, i want to see what you actually have.

Offline AxKeeper

  • Contributor
  • ****
  • Posts: 165
  • Last Login:February 16, 2016, 08:44:04 PM
  • What? You want credit? Debit or Mastercard? :P
    • Mugen Multiverse
Re: Command Limiter
« Reply #16 on: May 08, 2012, 04:39:50 AM »
;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, 1]
type = ChangeAnim
triggerall = life > (lifemax/4)
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 1]
type = ChangeAnim
triggerall = life <= (lifemax/4)
trigger1 = Anim != 1 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 1

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

;---------------------------------------------------------------------------
; Stand to Crouch
[Statedef 10]
type    = C
physics = C
anim = 10

[State 10, 1]
type = VelMul
trigger1 = Time = 0
x = .75

[State 10, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
; Crouching
[Statedef 11]
type    = C
physics = C
anim = 11
sprpriority = 0

[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 11

;---------------------------------------------------------------------------
; Crouch to Stand
[Statedef 12]
type    = S
physics = S
anim = 12

[State 12, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

;---------------------------------------------------------------------------
; Walk Before Match
[Statedef 22]
type    = S
physics = S
sprpriority = 0

[State 0]
type = varset
trigger1 = time = 1
var(50) = 0

[State 0]
type = posset
trigger1 = 1
y = 0

[State 0]
type = VelSet
trigger1 = Time = 0
y = 0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)/1.5

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)/1.5

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 22 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 22

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 23 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 23

[State 2, Ken]
type = ChangeAnim
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
trigger1 = Anim != 0
trigger1 = life > lifemax/4
value = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
trigger1 = Anim != 1
trigger1 = life <= lifemax/4
value = 1

[State 20, 2]
type = VelSet
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
x = 0

[State var]
type = VarSet
trigger1 = roundstate != 2
fvar(9) = floor(pos x)

[State F]
type = posset
trigger1 = roundstate = 2
trigger1 = fvar(9) != 0
x = fvar(9)

[State F]
type = varset
trigger1 = roundstate = 2
fvar(9) = 0

[State F]
type = changestate
trigger1 = ctrl
value = ifelse((command = "holdfwd") || (command ="holdback"),22,0)

;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21


[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------

 @^@
"Aren't they already committing a bigger crime by stealing from gaming companies to begin with? Silly goose" :D

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Command Limiter
« Reply #17 on: May 08, 2012, 04:32:15 PM »
You have your new jumpstart sending you back to 0, that's wrong because it'll break the walk animation. You have the walk stuff in there for some obscure reason and because of the changeanims it'll flicker. You are in all other senses very close to what i gave you so i do not understand the problem of what i gave you.

I will, for the hell of it, test what i wrote when i get home.

Offline AxKeeper

  • Contributor
  • ****
  • Posts: 165
  • Last Login:February 16, 2016, 08:44:04 PM
  • What? You want credit? Debit or Mastercard? :P
    • Mugen Multiverse
Re: Command Limiter
« Reply #18 on: May 08, 2012, 08:28:23 PM »
Ok  :(|)
"Aren't they already committing a bigger crime by stealing from gaming companies to begin with? Silly goose" :D

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Command Limiter
« Reply #19 on: May 09, 2012, 02:42:09 AM »
Put EXACTLY what i wrote into my current wip. It did what i would expect. No animation resets, no jump. Dunno what the heck yours did that was "wrong"

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

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]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by ExShadow
[November 02, 2024, 04:54:41 AM]


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


Rooftop Skyline(1.1 Only/AIGS) by Vegaz by LightFlare
[October 21, 2024, 12:13:37 PM]


Secluded Base(1.1 Only/AIGS) by Vegaz by LightFlare
[October 17, 2024, 01:21:06 PM]


Ultimate Balrog + stage by ELECTRO
[October 17, 2024, 05:40:31 AM]


Classic VS : Balrog by ELECTRO
[October 08, 2024, 04:35:53 PM]

* 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