UPLOAD, SHARE, PRESERVE MUGEN FOR ETERNITY!

Results 1 to 4 of 4

Thread: Character won't attack

  1. #1
    Join Date
    Apr 2022
    Location
    Posts
    1
    Uploads
    0
    Comments
    2

    Question Character won't attack

    I'm making a character on kfm template, i already coded in 2 attacks for that character, but it only can move around and jump.

    i'm not able to post links so i'll only send the parts of the code related to the moves

    cmd, states
    Code:
    [Statedef -1]
    
    
    [State -1, jab]
    type = ChangeState
    value = 200
    trigger1 = command = "b" && statetype = S && ctrl 
    
    [State -1, Drink Spill]
    type = ChangeState
    value = 500
    trigger1 = command = "rightAtk" && statetype = S && ctrl
    cmd, input

    Code:
    [Command]
    name = "rightAtk";Required (do not remove)
    command = F + b
    time = 1
    cns

    Code:
    ;Drink Spill
    [Statedef 500]
    type = s
    movetype = A
    physics = S
    juggle = 0
    anim = 200
    sprpriority = 2
    ctrl = 0
    
    [State 500, 1]
    type = HitDef
    trigger1 = !time
    attr = S, NA                     ;Attribute: Standing, Normal Attack
    damage = 23, 0                   ;Damage that move inflicts, guard damage
    animtype = Medium                ;Animation type: Light, Medium, Heavy, Back (def: Light)
    guardflag = M                   ;Flags of conditions that move can hit
    priority = 5, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
    ;Hit/Miss/Dodge type (Def: Hit)
    pausetime = 5, 8                 ;Time attacker pauses, time opponent shakes
    sparkno = 0                      ;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 = 500, 0                  ;Sound to play on hit
    guardsound = 6, 0                ;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 = Low                  ;Type: High, Low, Trip (def: same as ground.type)
    air.velocity = -2,0           ;X-velocity at which opponent is pushed,
    ;Y-velocity at which opponent is pushed
    air.hittime = 15 
    [State 500, 2]
    type = PlaySnd
    trigger1 = Time = 12
    value = 500, 0
    
    [State 500, ChangeState]
    type = ChangeState
    trigger1 = animtime = 28
    value = 0
    ctrl = 0
    
    
    
    
    ;---------------------------------------------------------------------------
    ;Jab
    [Statedef 200]
    type = s
    movetype = S
    physics = S
    juggle = 0
    anim = 210
    sprpriority = 2
    ctrl = 0
    
    [State 200, 1]
    type = HitDef
    trigger1 = !time
    attr = S, NA                     ;Attribute: Standing, Normal Attack
    damage = 23, 0                   ;Damage that move inflicts, guard damage
    
    [State 200, ChangeState]
    type = ChangeState
    trigger1 = animtime = 17
    value = 0
    ctrl = 1



  2. #2
    Join Date
    May 2019
    Location
    Posts
    968
    Uploads
    8
    Comments
    121
    Blog Entries
    2

    Default

    Its in state -1. Not sure if its because my knowledge is limited to kung fu man's code style and you're coding differently and just using kfm template, but the basic way is to keep the jab in state 200 and any other move in their respective states.

  3. #3
    Join Date
    Feb 2019
    Location
    Posts
    32
    Uploads
    0
    Comments
    479

    Default

    EDIT: I see this is a command issue and not an AI issue lol

  4. #4
    Join Date
    Jun 2020
    Location
    Posts
    179
    Uploads
    0
    Comments
    1

    Default Re: Character won't attack

    Just by glancing over, your changestate triggers for both states should be animetime=0. Animetime only takes negative values (except 0). Since you have it +ve, the changestate will happens as soon as you go into the states, thus sending you back to state 0. You should set ctrl=1 for all changestates back to 0 for any standard moves. Also in your statedef -1, commands are read in order of complexity (must have more complex commands before simple ones) so your drink spill should be before jab else it won't trigger properly if ever at all.

Similar Threads

  1. Mugen stops responding after a specific attack from a character
    By yaranaika_hollow in forum MUGEN Configuration Help
    Replies: 2
    Last Post: Nov 22, 2021, 21:11
  2. Character gets stuck when performing Basic or Special attack
    By Tweenies_1998 in forum MUGEN Development Help
    Replies: 4
    Last Post: Nov 22, 2021, 11:05
  3. Character does not perform attack
    By Pango in forum MUGEN Development Help
    Replies: 6
    Last Post: Oct 23, 2019, 11:50
  4. character can't attack
    By sonaz in forum MUGEN Configuration Help
    Replies: 6
    Last Post: May 31, 2019, 19:35
  5. Character Attack Speed
    By NegaDrive in forum MUGEN Configuration Help
    Replies: 2
    Last Post: Aug 08, 2016, 02:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •