YesNoOk
avatar

Having a problem in FF3 (Read 759 times)

Started by Drewism19, February 14, 2021, 03:37:14 am
Share this topic:
Having a problem in FF3
New #1  February 14, 2021, 03:37:14 am
  • *
    • USA
Hi, so I'm working on a character in FF3, and I have this problem. To try to explain, I'm working on the character's light stand punch, and when I mash the input for the move the animation repeats and the attack doesn't go off until I stop mashing, this is NOT what I want. I'm new to this, and I want it so you have to wait until after the move is finished to use the move again. Sorry, I'm new to making characters and any guidance would be greatly appreciated!
Last Edit: February 14, 2021, 10:40:45 pm by Drewism19
Re: Having a problem in FF3
#2  February 14, 2021, 04:03:15 am
  • ****
  • Self-Sufficient Subhuman
  • "I hope you're ready for a beating!"
    • USA
You probably have the trigger set so you can use it whenever. Meaning, if you just mash the button over and over, you keep resetting the move cause you can use it over and over.

... I suck at explaining it, really. But you need to have it so the move can only trigger when you have control, and when you're attacking, you shouldn't have control during the move.
Re: Having a problem in FF3
#3  February 14, 2021, 04:26:44 am
  • ****
  • Self-Sufficient Subhuman
  • "I hope you're ready for a beating!"
    • USA
Here, lemme show some code on one of my chars.

At the top of Statedef 200, Stand Light Punch, I have this as the initial definition:

Code:
[Statedef 200]
type = S
movetype= A
physics = S
ctrl = 0
anim = 200
sprpriority = 2
poweradd = 20
hitcountpersist = 1

'ctrl = 0' is necessary (for me at least lol) cause it takes away control from the player, meaning as long as the attack is going on, the player cannot override it with any other inputs.

In the cmd file, I have this for the trigger:

Code:
[State -1]
type = ChangeState
value = 200
triggerall = roundstate = 2 && !AILevel;(59)
triggerall = command = "x" && command != "holddown"
trigger1 = statetype = S && ctrl

The main important thing here is the trigger1. The move only occurs when the player is standing, and has control. Which they only have if it's set to 1, not to 0, obviously.

Does that make sense?
Re: Having a problem in FF3
#4  February 14, 2021, 04:29:20 am
  • *
    • USA
Here, lemme show some code on one of my chars.

At the top of Statedef 200, Stand Light Punch, I have this as the initial definition:

Code:
[Statedef 200]
type = S
movetype= A
physics = S
ctrl = 0
anim = 200
sprpriority = 2
poweradd = 20
hitcountpersist = 1

'ctrl = 0' is necessary (for me at least lol) cause it takes away control from the player, meaning as long as the attack is going on, the player cannot override it with any other inputs.

In the cmd file, I have this for the trigger:

Code:
[State -1]
type = ChangeState
value = 200
triggerall = roundstate = 2 && !AILevel;(59)
triggerall = command = "x" && command != "holddown"
trigger1 = statetype = S && ctrl

The main important thing here is the trigger1. The move only occurs when the player is standing, and has control. Which they only have if it's set to 1, not to 0, obviously.

Does that make sense?

Yes, at least a LOT more than before. Thank You!
Re: Having a problem in FF3
#5  February 14, 2021, 04:33:16 am
  • *
    • USA
I still don't exactly get it, but I sort of get the premise of "I need to set the ctrl to 0 when the move is happening. This is my code so far.
Code:
[Statedef 200]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 0                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                        ;Set ctrl (Def: no change)
anim = 200                       ;Change animation (Def: no change)
poweradd = 5                   ;Power to add (Def: 0)
sprpriority = 2                  ;Set p1's sprite layering priority to 2 (in front)

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 23, 0                   ;Damage that move inflicts, guard damage
animtype = Light          ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 2, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10, 10                 ;Time attacker pauses, time opponent shakes
guard.pausetime = 8, 8
sparkno = 4                     ;Spark anim no (Def: set above)
sparkxy = -10, -76               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = 1, 1                 ;Sound to play on hit
guardsound = 1, 1                ;Sound to play on guard
ground.type = High             ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 11             ;Time opponent is in hit state
ground.velocity = -4             ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 15                 ;Time before opponent regains control in air

[State 200, 2]
type = PlaySnd
trigger1 = animelem = 4
value = 1, 1

[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
Re: Having a problem in FF3
#6  February 14, 2021, 04:40:10 am
  • ****
  • Self-Sufficient Subhuman
  • "I hope you're ready for a beating!"
    • USA
I don't think it's a problem with your move code itself, I think it's a problem with the command for it in the cmd file.
Re: Having a problem in FF3
#7  February 14, 2021, 05:12:46 am
  • *
    • USA