News:

MFG's Character of the Month: September 2026 Voting

Main Menu

Need help with power charge

Started by Nulo, July 22, 2024, 04:16:29 AM

Previous topic - Next topic

Nulo

I'm creating my first mugen character and i would like to know how to make a power charge code for the Enter key..
It's a JUS character so i want to replicate these power chargers in those JUS Style characters.

XGargoyle

Check the power charge code in one of these JUS characters and copy it. Simple as that


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!

Bardock Revenge

Quote from: Nulo on July 22, 2024, 04:16:29 AM
I'm creating my first mugen character and i would like to know how to make a power charge code for the Enter key..
It's a JUS character so i want to replicate these power chargers in those JUS Style characters.

cara power add e bastante simples

[State 0, PowerAdd]; Normal
type = PowerAdd
trigger1 = 1
value = 10

e no final do golpe

[State 0, 3]
type = ChangeState
trigger1 = command != "start" ; botao star
trigger2 = power = 3000 ; ou power quando chegar no 3000
value = 0
ctrl = 1

tudo depende como voce quer fazer :)

Nulo

#3
Quote from: Bardock Revenge on July 23, 2024, 07:40:45 AM
Quote from: Nulo on July 22, 2024, 04:16:29 AM
I'm creating my first mugen character and i would like to know how to make a power charge code for the Enter key..
It's a JUS character so i want to replicate these power chargers in those JUS Style characters.

cara power add e bastante simples

[State 0, PowerAdd]; Normal
type = PowerAdd
trigger1 = 1
value = 10

e no final do golpe

[State 0, 3]
type = ChangeState
trigger1 = command != "start" ; botao star
trigger2 = power = 3000 ; ou power quando chegar no 3000
value = 0
ctrl = 1

tudo depende como voce quer fazer :)
então, eu gostaria de colocar um comando para carregar a barra de poder apenas segurando o enter.
eu testei o code que voce mandou e vi um tutorial junto e o maximo que deu foi a barra de poder enchendo sozinha :/

Nulo

Quote from: XGargoyle on July 22, 2024, 02:55:43 PM
Check the power charge code in one of these JUS characters and copy it. Simple as that
i tried to copy from a character and it didnt work so well

VictorCYBR

#5
1. Create a command for holding enter in cmd:


[Command]
name = "holdstart"
command = /s
time = 1


2. Add the states:


[StateDef 1000]
type = S
physics = S
moveType = I
anim = 1000
velSet = 0,0
ctrl = 0

[State 1000, PowerAdd]
type = PowerAdd
triggerAll = Power < const(data.power) && Power < PowerMax
trigger1 = !AILevel && command = "holdstart"

[State 1000, End]
type = ChangeState
trigger1 = Power >= const(data.power) || Power >= PowerMax || RoundState != 2
trigger2 = !AILevel && command != "holdstart"
value = 0
ctrl = 1


This is very basic, you should tweak it.

3. Finally, add the changestate to the cmd:


[State -1, Power Charge]
type = ChangeState
value = 1000
triggerAll = !AILevel
trigger1 = command = "holdstart"
trigger1 = RoundState = 2 && StateType != A
trigger1 = Power < const(data.Power) && Power < PowerMax
trigger1 = ctrl

Nulo

Quote from: DeathScythe on July 24, 2024, 04:41:52 AM
1. Create a command for holding enter in cmd:


[Command]
name = "holdstart"
command = /s
time = 1


2. Add the states:


[StateDef 1000]
type = S
physics = S
moveType = I
anim = 1000
velSet = 0,0
ctrl = 0

[State 1000, PowerAdd]
type = PowerAdd
triggerAll = Power < const(data.power) && Power < PowerMax
trigger1 = !AILevel && command = "holdstart"

[State 1000, End]
type = ChangeState
trigger1 = Power >= const(data.power) || Power >= PowerMax || RoundState != 2
trigger2 = !AILevel && command != "holdstart"
value = 0
ctrl = 1


This is very basic, you should tweak it.

3. Finally, add the changestate to the cmd:


[State -1, Power Charge]
type = ChangeState
value = 1000
triggerAll = !AILevel
trigger1 = command = "holdstart"
trigger1 = RoundState = 2 && StateType != A
trigger1 = Power < const(data.Power) && Power < PowerMax
trigger1 = ctrl


this error appears:
Library error message: Died parsing !AILevel && command = "holdstart"

Error detected.

Undefined command label: "command".
If not misspelling in CNS, check CMD
Error parsing trigger1, 1
Error parsing [State 1000, PowerAdd]
Error in [StateDef 1000]
Error in Teto.cns:788
Error loading chars/ffchartest/ffchartest.def
Error loading p1

btw i'm using fighter factory classic, do i need another version?

VictorCYBR

#7
Hmmm... try using parenthesis, like this:

trigger1 = !AILevel && (command = "holdstart")

Also change it in the other line too

trigger2 = !AILevel && (command != "holdstart")

Also, forgot to mention in my previous post, but you need to specify the amount of power you want to gain:

[State 1000, PowerAdd]
type = PowerAdd
triggerAll = Power < const(data.power) && Power < PowerMax
trigger1 = !AILevel && command = "holdstart"
value = 2

EDIT: oh, and about fighter factory, you don't "need" another version but is highly recommended to use FF3 or FFStudio. FF3 is the most stable, Studio can crash more often but has more features.

Nulo

#8
Quote from: DeathScythe on July 24, 2024, 06:34:37 PM
Hmmm... try using parenthesis, like this:

trigger1 = !AILevel && (command = "holdstart")

Also change it in the other line too

trigger2 = !AILevel && (command != "holdstart")

Also, forgot to mention in my previous post, but you need to specify the amount of power you want to gain:

[State 1000, PowerAdd]
type = PowerAdd
triggerAll = Power < const(data.power) && Power < PowerMax
trigger1 = !AILevel && command = "holdstart"
value = 2

EDIT: oh, and about fighter factory, you don't "need" another version but is highly recommended to use FF3 or FFStudio. FF3 is the most stable, Studio can crash more often but has more features.
Thanks, It worked for !AILevel, now it looks like this:

Library error message: Died parsing command = "holdstart")

Error detected.

Undefined command label: "command".
If not misspelling in CNS, check CMD
Error parsing trigger1, 1
Error parsing [State 1000, PowerAdd]
Error in [StateDef 1000]
Error in Teto.cns:574
Error loading chars/ffchartest/ffchartest.def
Error loading p1

(also it's good that i don't need another version)

(EDIT: I replace the two "holdstart" commands in cns to "hold_s" and the first error line disappeared)

Error detected.

Error parsing [State 1000, End]
Error in [StateDef 1000]
Error in Teto.cns:578
Error loading chars/ffchartest/ffchartest.def
Error loading p1


VictorCYBR

Can you post the whole code here so I can take a look?
With that last error message it's impossible to know what is going on.

Nulo

Quote from: DeathScythe on July 24, 2024, 07:35:29 PM
Can you post the whole code here so I can take a look?
With that last error message it's impossible to know what is going on.
Of course.

Error detected.

Error parsing [State 1000, End]
Error in [StateDef 1000]
Error in Teto.cns:578
Error loading chars/ffchartest/ffchartest.def
Error loading p1

Clipboard tail:
Gameflow 6
Reset persist vars team 0
Reset persist vars team 1
Gameflow 8
Gameflow 9
Gameflow 10
Gameflow 11
Loading match assets...
Loading stage...
  Loading BG...OK
Stage loaded OK
  Allocating helpers...OK
Match RNG seed: 1672804729
Reset persist vars team 0
Reset persist vars team 1
Loading character chars/ffchartest/ffchartest.def...
  Loading info...OK
  Loading cmd command set Teto.cmd...OK
  Loading cns Teto.cns...Freeing player RC Teto Kasane...CMD...CNS...SFF...AIR...SND...Misc...OK
Character ffchartest.def failed to load


VictorCYBR

I mean the code in CNS for the power charge.

Nulo

oh i'm sorry.
here.

; PowerCharge
[State 1000, PowerAdd]
type = PowerAdd
triggerAll = Power < const(data.power) && Power < PowerMax
trigger1 = !AILevel && (command = "hold_s")
value = 2

[State 1000, End]
type = ChangeState
trigger1 = Power >= const(data.power) || Power >= PowerMax || RoundState != 2
trigger2 = !AILevel && (command != "hold_s")
ctrl = 1

VictorCYBR

I see, you're missing the 'value' parameter in the ChangeState. Check my first post. It should send you back to state 0.

Nulo

OMG THANK YOU SO MUCH!
It finally worked!

VictorCYBR

No problem, glad you got it working. :mthumbs: