Would you like to react to this message? Create an account in a few clicks or log in to continue.
Welcome!!! - Bienvenidos!!! - ( We hope you will get involved in the MMV Community which is dedicated to having fun with Mugen ) - Bienvenidos!!! - Welcome!!!
Need Help from a Coder to modify basic attacks during an Hyper state
5 posters
Author
Message
Raijjin
Posts : 280 Join date : 2022-06-08 Location : France
Subject: Need Help from a Coder to modify basic attacks during an Hyper state September 24th 2023, 11:45 am
Hello there !
I was reworking (graphically) one of the old characters I worked on some years ago, and decided to change some gameplay elements in the meantime.
My problem is: this character has an Hyper state, with a bar and all, during which he hits harder. I noticed that there was stronger anim into the character that were based on the same sprite as basic attacks, but stronger. So I want to add these anims as the new basic attacks only during the Hyper state. Like replace the weak, medium and strong punch by something else, but only temporarily.
I've tried to do it myself, but nothing happens. I:
- Putted this into the commands input: [State -1, X] type = ChangeState value = 205 (<- this is the state of the new attack) triggerall = Command = "x" triggerall = Command != "holddown" triggerall= var(20) = 3 trigger1 = (StateType = S) && (Ctrl)
- And I putted this into the states: [Statedef 205] type = S movetype= A physics = S juggle = 4 ctrl = 0 anim = 205 poweradd = 15 sprpriority = 2
[State 205, VelMul, corrida] type = VelMul trigger1 = Time = 0 trigger1 = PrevStateNo = 100 x = .8
[State 205, PlaySnd] type = PlaySnd trigger1 = AnimElem = 1 value = 8400,0
[State 205, ChangeState] type = ChangeState trigger1 = AnimTime = 0 value = 0 ctrl = 1
------------- The anim is here and all, but when I use this Hyper state, my character still use his basic punch. Any ideas here ? I would prefer if someone could do it for me (especially if I'm totally mistaken in my method), but knowing we're all really busy, just some tips or ideas might be enough. Thanks in advance
Shining
Posts : 4811 Join date : 2013-03-26 Age : 44 Location : Italy
Subject: Re: Need Help from a Coder to modify basic attacks during an Hyper state September 24th 2023, 12:09 pm
I think you should add new trigger with that hyper name ...but i m sure it s not so simple
crosspotts1.0
Posts : 4856 Join date : 2013-04-15 Age : 31 Location : GLEN BURNIE maryland
Subject: Re: Need Help from a Coder to modify basic attacks during an Hyper state September 24th 2023, 12:55 pm
Try this Change your Hyper state trigger to activate when your character enters Hyper state: [State -1, X] type = ChangeState value = 205 ; New Hyper state triggerall = Command = "x" triggerall = Command != "holddown" trigger1 = var(20) = 3 trigger2 = var(21) = 1 ; You might need to set up a variable to track the Hyper state trigger3 = var(22) = 0 ; This variable should be 1 when exiting the Hyper stateModify the Hyper state definition (State 205) to handle the animations during the Hyper state:[Statedef 205] type = S movetype= A physics = S juggle = 4 ctrl = 0 poweradd = 15 sprpriority = 2 anim = 205 ; Set your Hyper state animation here
[State 205, VelMul, corrida] type = VelMul trigger1 = Time = 0 x = .8
[State 205, PlaySnd] type = PlaySnd trigger1 = AnimElem = 1 value = 8400,0
[State 205, ChangeState] type = ChangeState trigger1 = AnimTime = 0 value = 0 ctrl = 1 This code should ensure that when your character enters the Hyper state (triggered by your conditions), it plays the animations defined in State 205 instead of the basic punch animations (State 100). You might need to adjust the trigger conditions further based on your specific character and game logic. Make sure you have a variable (e.g., var(21)) to track the Hyper state and another (e.g., var(22)) to exit it when needed.
Raijjin likes this post
Raijjin
Posts : 280 Join date : 2022-06-08 Location : France
Subject: Re: Need Help from a Coder to modify basic attacks during an Hyper state September 24th 2023, 2:10 pm
crosspotts1.0 wrote:
Try this Change your Hyper state trigger to activate when your character enters Hyper state: [State -1, X] type = ChangeState value = 205 ; New Hyper state triggerall = Command = "x" triggerall = Command != "holddown" trigger1 = var(20) = 3 trigger2 = var(21) = 1 ; You might need to set up a variable to track the Hyper state trigger3 = var(22) = 0 ; This variable should be 1 when exiting the Hyper stateModify the Hyper state definition (State 205) to handle the animations during the Hyper state:[Statedef 205] type = S movetype= A physics = S juggle = 4 ctrl = 0 poweradd = 15 sprpriority = 2 anim = 205 ; Set your Hyper state animation here
[State 205, VelMul, corrida] type = VelMul trigger1 = Time = 0 x = .8
[State 205, PlaySnd] type = PlaySnd trigger1 = AnimElem = 1 value = 8400,0
[State 205, ChangeState] type = ChangeState trigger1 = AnimTime = 0 value = 0 ctrl = 1 This code should ensure that when your character enters the Hyper state (triggered by your conditions), it plays the animations defined in State 205 instead of the basic punch animations (State 100). You might need to adjust the trigger conditions further based on your specific character and game logic. Make sure you have a variable (e.g., var(21)) to track the Hyper state and another (e.g., var(22)) to exit it when needed.
Not sure I get everything, but I'll try your idea as much as I can ! Thanks!
volzzilla
Posts : 10259 Join date : 2012-05-02
Subject: Re: Need Help from a Coder to modify basic attacks during an Hyper state September 25th 2023, 8:09 am
@crosspotts1.0 i'm impressed with what you said here
Shining
Posts : 4811 Join date : 2013-03-26 Age : 44 Location : Italy
Subject: Re: Need Help from a Coder to modify basic attacks during an Hyper state September 25th 2023, 9:24 am
volzzilla wrote:
@crosspotts1.0 i'm impressed with what you said here
Me tooo
ajrenalin
Posts : 146 Join date : 2013-02-08
Subject: Re: Need Help from a Coder to modify basic attacks during an Hyper state February 2nd 2024, 1:07 am
I'm just assuming that this code (triggerall= var(20) = 3) is the hyper command when active. If I am correct here than what you need to do is go through the normal attacks and add the code
triggerall= var(20) != 3
Doing this will make the normal attacks NOT work when var 20 is not equal to 3
When Var 3 is = to 3 than those NEW attacks will now work.
Like this
[State -1, X] type = ChangeState value = 200 triggerall= var(20) != 3
[State -1, X] type = ChangeState value = 205 triggerall= var(20) = 3
OR (IF) Var(20)=3 is not what i thought it was up top than use the code below.. Like i said i need to know what var(20)=3
[State -1, X] type = ChangeState value = 200 triggerall= stateno != [3000,3999]
[State -1, X] type = ChangeState value = 205 triggerall= stateno = [3000,3999]
If Var(20) = 3 is Not the hyper timer than can you tell me what it is, that will help out much.
Raijjin
Posts : 280 Join date : 2022-06-08 Location : France
Subject: Re: Need Help from a Coder to modify basic attacks during an Hyper state February 2nd 2024, 2:45 am
ajrenalin wrote:
I'm just assuming that this code (triggerall= var(20) = 3) is the hyper command when active. If I am correct here than what you need to do is go through the normal attacks and add the code
triggerall= var(20) != 3
Doing this will make the normal attacks NOT work when var 20 is not equal to 3
When Var 3 is = to 3 than those NEW attacks will now work.
Like this
[State -1, X] type = ChangeState value = 200 triggerall= var(20) != 3
[State -1, X] type = ChangeState value = 205 triggerall= var(20) = 3
OR (IF) Var(20)=3 is not what i thought it was up top than use the code below.. Like i said i need to know what var(20)=3
[State -1, X] type = ChangeState value = 200 triggerall= stateno != [3000,3999]
[State -1, X] type = ChangeState value = 205 triggerall= stateno = [3000,3999]
If Var(20) = 3 is Not the hyper timer than can you tell me what it is, that will help out much.
Thanks for all of that ! It's been a while, so I'm not sure what state it is, but I think that's the state of the Hyper. The character was the latest Azrael I released (you can find it around here), but I'm not sure when I will go back working on it (and doing Mugen in general). You're welcome to check it by yourself if it's no bother for you What you wrote was really instructive anyway, so I'll try to do what you recommended when I can !
Thanks again
ajrenalin likes this post
Sponsored content
Subject: Re: Need Help from a Coder to modify basic attacks during an Hyper state
Need Help from a Coder to modify basic attacks during an Hyper state