Looking for help coding a Life regan
looking for something that is consistant and doesn't require the player to cast a motion or enter a state
any help or input will be greatly appreciated
Looking for help coding a Life regan
looking for something that is consistant and doesn't require the player to cast a motion or enter a state
any help or input will be greatly appreciated
Try the following:
;Life Regen
[Statedef -2]
[State -4,0]
type = LifeAdd
trigger1 = Life < LifeMax
trigger1 = RoundState = 2
value = 50
persistent = 10
To add it constantly, replace "RoundState = 2" with:
gametime%10 = 0
Value 50 is how much life you will acquire. 10 is how many ticks will go by, before health is restored. That is currently set for 300 life per second. Adjust accordingly
Awesome going to put this bad boy to the test! Thanks!
Hello buddy, coding related stuff should be posted at the development help section, i am moving this one for you, a little more attention next time ;)
Hmm....if that didn't help, try doing this instead
[State -3, Regeneration]
type = LifeAdd
triggerall = Alive = 1
trigger1 = (GameTime%10) = 0
ignorehitpause = 0
value = 2
Life Regen code is a bit tricky, as it has to be correct and specific. But the way mugen is structured, it's a bit difficult to tell. This below is pulled directly from the docs.
So the code I just put above this may achieve what you're looking for instead, and hopefully it works.ii. Trigger persistency
In the case where you do not want the trigger to activate every single time the condition is true, you will need to add a "persistent" paramter. Let us begin with an example:
[State 310, 1]
type = PosAdd
trigger1 = Vel Y > 1
x = 10
This state controller moves P1 forwards by 10 pixels for every tick of game time where P1's Y-velocity is greater than 1. That is, the controller is being activated everytime the trigger condition is true. If we want the controller to be activated only once, we will need to add a line:
[State 310, 1]
type = PosAdd
trigger1 = Vel Y > 1
persistent = 0 ;<-- Added this line
x = 10
"Persistent" has a default value of 1, meaning that the controller is activated everytime the trigger is true.
Setting "persistent" to 0 allows the controller to be activated only once during that state. This holds true until P1 leaves that state. If P1 returns to that state later, the controller can be activated once again.
The "persistent" parameter can also take values other than 0 and 1:
[State 310, 1]
type = PosAdd
trigger1 = Vel Y > 1
persistent = 2 ;<-- Modified this line
x = 10
In this case, setting "persistent" to 2 means the controller will be activated once of every two times the trigger is true. Setting "persistent" to 3 activates the controller every 3rd time, and so on.
Thank you so much for responding yet again and I'm happy to say it worked like a charm!![]()
No problem, glad I was able to help.
Bookmarks