YesNoOk
avatar

help with bounce off wall move (Read 1951 times)

Started by Iori Fue, September 11, 2007, 11:45:49 am
Share this topic:
help with bounce off wall move
#1  September 11, 2007, 11:45:49 am
  • avatar
  • ***
how do i code a kick that makes my opponent bounce off the wall? like sols kick off guilty gear accent core?

(cyanide.. ive already tried my hardest to look through the docs for this one)
Re: help with bounce off wall move
#2  September 11, 2007, 11:47:34 am
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
You may have checked the docs... but you didn't check KFM's code.
The almighty Elecbyte character has this type of move in it. Go look at its code.
Re: help with bounce off wall move
#3  September 11, 2007, 11:55:15 am
  • avatar
  • ***
thanks got it now, but when i do it he he disappears after i hit him?
Re: help with bounce off wall move
#4  September 11, 2007, 11:59:10 am
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
Did you even try to understand what the code does ?

The opponent disappears ? Did you also copy the custom state in which you send the opponent ?
Re: help with bounce off wall move
#5  September 11, 2007, 12:01:18 pm
  • avatar
  • ***
i do understand what the code does, its actually quite easy after i look at it, i did copy the custom state too, do i have to add a new animation for that? [1025]
Re: help with bounce off wall move
#6  September 11, 2007, 12:06:14 pm
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
Do you have a debug message in your Debug mode ? In what state do you send your opponent (check in debug mode) ? Is there a selfanimexist or something like that that may be needed (I can't remember KFM's code) ?
Re: help with bounce off wall move
#7  September 11, 2007, 12:08:26 pm
  • avatar
  • ***
Quote
[Statedef 1020]
type    = S
movetype= A
physics = N
juggle  = 6
velset = 0,0
anim = 240
ctrl = 0
sprpriority = 2

[State 1020, Friction]
type = VelMul
trigger1 = 1
x = .85 * ifelse (AnimElemTime(6) < 0, 1, .8)

[State 1020, 6]
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
animtype  = Hard
damage    = 95, 5
getpower  = 0
priority  = 4
guardflag = MA
pausetime = 8,7
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -8,-7
guard.velocity = -7
air.velocity = -8,-7
airguard.velocity = -5, -4
fall = 1
p2stateno = 1025    ;Make p2 go to state 1025 on hit
p2facing = 1        ;Force to face p1

[State 1020, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------
; Hit by Fast Kung Fu Palm - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 1025]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1025, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = 1
value = 1025

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 1026

;------------------
; Hit by Fast Kung Fu Palm - flying through the air
; (a custom gethit state)
[Statedef 1026]
type    = A
movetype= H
physics = N

[State 1026, Velocity]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 1026, Gravity]
type = VelAdd
trigger1 = 1
y = .45

[State 1026, No scroll]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 1026, Hit wall]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 1027

[State 1026, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;------------------
; Hit by Fast Kung Fu Palm - hit wall
; (a custom gethit state)
[Statedef 1027]
type    = A
movetype= H
physics = N

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1027, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1027, Spark]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1027

[State 1027, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1028

i took out the playsnds and movement and afterimages
Re: help with bounce off wall move
#8  September 11, 2007, 12:16:11 pm
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
What's state 1028 already ?

And when does he disappear ? When you touch him, when he bounces on the wall, when he touches the ground ?
Re: help with bounce off wall move
#9  September 11, 2007, 12:18:52 pm
  • avatar
  • ***
when i hit him, he flys through the air and when he touches the ground but when he hits the wall it goes into his standing anim
Re: help with bounce off wall move
#10  September 11, 2007, 12:21:29 pm
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
Re: help with bounce off wall move
#11  September 11, 2007, 12:23:55 pm
  • avatar
  • ***
i mean he disappears then. but when he hits the wall he goes into his stading anim, then bounces off and dissappears.

(this is the copied kfm state)
Quote
[Statedef 1028]
type    = A
movetype= H
physics = N

[State 1028, 1]
type = NotHitBy
trigger1 = 1
value = , NA, NP

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -6

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100
Re: help with bounce off wall move
#12  September 11, 2007, 12:33:36 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
See what i mean about learning? Too many questions = you being unable to bug check properly.

Load up debug (ctrl+D) as has been stated and see what error messages you get, run through and correct them 1 by 1, the code is documented to the extent you'll KNOW where the problems are through lines like [state 1025,1] and so forth for any errors that show up.

See most of us know what this code does and how it works. But it's very hard to tell you where your problem lies when you don't really know yourself. Keep trying please.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: help with bounce off wall move
#13  September 11, 2007, 12:34:48 pm
  • avatar
  • ***
kk.