YesNoOk
avatar

zig zagging problem please help! (Read 1605 times)

Started by dark byakuya, January 08, 2010, 06:04:36 pm
Share this topic:
zig zagging problem please help!
#1  January 08, 2010, 06:04:36 pm
  • **
  • O.O!!!! おまえわアルファですか?
    • USA
hi its esau..im trying to make  my char zig zag across the screen in deferent  directions   i've  been trying  countless times but made no progress.. heres code i learned so far if it helps.




[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2




[State 0, VelAdd]
type = VelAdd
trigger1 = time = 0
x = random
y = 0
ignorehitpause = 1
;persistent =


[State 3000, 5]
type = HitDef
trigger1 = AnimElemtime(1) >= 0
trigger2 = AnimElem = 13
attr = S, HA
animtype  = Hard
damage    = 12,4
getpower  = 10
priority  = 6
guardflag = MA
pausetime = 0,15
sparkxy = -10,-60
hitsound   = S300,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30









[State 0, Explod]
type = Explod
trigger1 = time= 90
anim = 3066
ID = 3066
pos = 0,-40
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;persistent =



[State 0, EnvColor]
type = EnvColor
trigger1 = 1
value = 255,255,255
time = 34
under = 1
;ignorehitpause =
;persistent =



[State a, VelAdd]
type = VelAdd
trigger1 = time = 8
x = random
y = 0
;ignorehitpause =
;persistent =




[State a, VelAdd]
type = VelAdd
trigger1 = time = 16
x = random
y = 0
;ignorehitpause =
;persistent =

[State 0, Turn]
type = Turn
trigger1 = time = 4
;ignorehitpause =
;persistent =


[State a, VelAdd]
type = VelAdd
trigger1 = time = 22
x = random
y = 0
;ignorehitpause =
;persistent =


[State a, VelAdd]
type = VelAdd
trigger1 = time = 26
x = random
y = 0
;ignorehitpause =
;persistent =


[State 0, Turn]
type = Turn
trigger1 = time = 8
;ignorehitpause =
;persistent =


[State a VelAdd]
type = VelAdd
trigger1 = time = 34
x = random
y = 0
;ignorehitpause =
;persistent =



[State 0, VelAdd]
type = VelAdd
trigger1 = 42
x = random
y = 0
;ignorehitpause =
;persistent =


[State 0, Turn]
type = Turn
trigger1 = time = 16
;ignorehitpause =
;persistent =

[State 0, VelAdd]
type = VelAdd
trigger1 = 48
x = random
y = 0
;ignorehitpause =
;persistent =



[State 0, VelAdd]
type = VelAdd
trigger1 = 54
x = random
y = 0
;ignorehitpause =
;persistent =

[State 0, Turn]
type = Turn
trigger1 = time = 22
;ignorehitpause =
;persistent =

[State 0, VelAdd]
type = VelAdd
trigger1 = 60
x = random
y = 0
;ignorehitpause =
;persistent =



[State 0, VelAdd]
type = VelAdd
trigger1 = 66
x = random
y = 0
;ignorehitpause =
;persistent =


[State 0, Turn]
type = Turn
trigger1 = time = 26
;ignorehitpause =
;persistent =



[State 0, VelAdd]
type = VelAdd
trigger1 = time = 74
x = random
y = 0
;ignorehitpause =
;persistent =


[State 0, VelAdd]
type = VelAdd
trigger1 = time = 82
x = random
y = 0
;ignorehitpause =
;persistent =


[State 0, Turn]
type = Turn
trigger1 = time = 34
;ignorehitpause =
;persistent =





[State 0, VelAdd]
type = VelAdd
trigger1 = time = 88
x = random
y = 0
;ignorehitpause =
;persistent =


[State 0, VelAdd]
type = VelAdd
trigger1 = time = 94
x = random
y = 0
;ignorehitpause =
;persistent =


[State 0, Turn]
type = Turn
trigger1 = time = 48
;ignorehitpause =
;persistent =






[State 0, VelAdd]
type = VelAdd
trigger1 = time = 100
x = random
y = 0
;ignorehitpause =
;persistent =



[State 0, Turn]
type = Turn
trigger1 = time = 54
;ignorehitpause =
;persistent =




[State 0, VelAdd]
type = VelAdd
trigger1 = time = 106
x = random
y = 0
;ignorehitpause =
;persistent =


[State 0, Turn]
type = Turn
trigger1 = time = 60
;ignorehitpause =
;persistent =





[State 0, Turn]
type = Turn
trigger1 = time = 66
;ignorehitpause =
;persistent =





[State 0, Turn]
type = Turn
trigger1 = time = 74
;ignorehitpause =
;persistent =



[State 0, Turn]
type = Turn
trigger1 = time = 84
;ignorehitpause =
;persistent =



[State 0, Turn]
type = Turn
trigger1 = time = 88
;ignorehitpause =
;persistent =



[State 0, Turn]
type = Turn
trigger1 = time = 94
;ignorehitpause =
;persistent =



[State 0, Turn]
type = Turn
trigger1 = time = 100
;ignorehitpause =
;persistent =



[State 0, Turn]
type = Turn
trigger1 = time = 106
;ignorehitpause =
;persistent =


[State 0, VelAdd]
type = VelAdd
trigger1 = time = 106
x = random
y = 0
;ignorehitpause =
;persistent =


i used the same over  process over again as you just  seen  and    added   y  velocity and then
add -y   velocity to the create zig zag animation.. but failed  the problem is
every the add  y vel the char just goes upward .






thanks alot you really helped me out
Oh no alpha is gonna blooow!! EVERYONE PANIC!!!!!!!!!!
Last Edit: January 10, 2010, 06:03:48 am by esau
Re: zig zagging problem please help!
#2  January 08, 2010, 10:49:29 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You realise random is any value between 0 and 999? Generally a stupidly fast velocity is about 20. You're WELL above that with random on it's own. Try random%20 instead, that'll get you a decent variety of vels without sending you 999 pixels in one direction after a tick.

If you wish to make use of negative and positive values

-10+random%21 that will be any value between -10 and 10


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: zig zagging problem please help!
#3  January 10, 2010, 06:06:59 am
  • **
  • O.O!!!! おまえわアルファですか?
    • USA
thanks you really helped me out.
Oh no alpha is gonna blooow!! EVERYONE PANIC!!!!!!!!!!