collapse

Author Topic: Flying code by Flowagirl  (Read 1705 times)

0 Members and 1 Guest are viewing this topic.

Offline StarXS

  • Infinity Regular
  • ****
  • Posts: 561
  • Last Login:March 07, 2008, 09:43:28 PM
  • Legionnaire
    • Mugen Battle Network Blog
    • Email
Flying code by Flowagirl
« on: September 28, 2007, 01:28:42 PM »
this should help some people out.. dont forget to credit FlowaGirl if you use this in your character. more tuts like this in the globe under my pic

Quote
---------------------------------------------------------------------------
The way flying works in Idainaru Densetsu is very simple; Pressing backward
or downwards on the directional keys move your character away from the
opponent, and forward or up to move towards. Your character will move in a
straight path.
---------------------------------------------------------------------------

The startup state.

[Statedef ****]
type = A
movetype = I
physics = N
anim = ****

[State ****: VarSet]
type = VarSet
trigger1 = (!Time)
var(0) = 1

[State ****: VelSet]
type = VelSet
trigger1 = (Time > 10)
y = -6

[State ****: VelAdd]
type = VelAdd
trigger1 = (Time > 10) && (Time, < y =" 0.40" type =" ChangeState" trigger1 =" (Time"> 30)
value = ***1

The flying state, when character is idle.

[Statedef ***1]
type = A
movetype = I
physics = N
anim = ***1
velset = 0,0
ctrl = 1

[State ***1: Turn]
type = Turn
trigger1 = (P2Dist X < -1)

This NULL is actually used to set a few variables at once, without actually having to use
that many VarSet's.
(Read Elecbyte's documentation on expressions.)

Var(0): The "You're flying" variable. You can use this to call upon when needed, such as
for the CMD file.

Var(1) and Var(2): Used for the floating effect.

[State ***1: Null]
type = Null
trigger1 = (!Time)
trigger1 = (Var(1) := 0) && (Var(0) := 1)
trigger2 = (Var(1) = -10) || (Var(1) = 10)
trigger2 = (Var(2) := IfElse(Var(1) = -10,0,1))

[State ***1: VarAdd]
type = VarAdd
trigger1 = 1
var(1) = IfElse(Var(2) = 0,1,-1)

[State ***1: VelAdd]
type = VelAdd
trigger1 = 1
y = IfElse(Var(2) = 1,0.05,-0.05)

***2 is the moving towards state, and ***3 for away.

[State ***1: ChangeState]
type = ChangeState
trigger1 = (Command = "holdup") || (Command = "holdfwd")
value = ***2

[State ***1: ChangeState]
type = ChangeState
trigger1 = (Command = "holddown") || (Command = "holdback")
value = ***3

Flying towards state.

[Statedef ***2]
type = A
movetype = I
physics = N
anim = ***2
ctrl = 1

This is used to check the position of the enemy, and sets the appropriate values to
move towards him/her.

FVar(0): X velocity
FVar(1): Y velocity

[State ***2: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

Moves the character, using the variables as reference. You cannot use those expressions
as shown above and put it directly into the VelSet. MUGEN will lock up after this is used
a number of times.

[State ***2: VelSet]
type = VelSet
trigger1 = (Whatever)
x = FVar(0)
y = FVar(1)

Go back to the idle state when commands are released.

[State ***2: ChangeState]
type = ChangeState
trigger1 = (Command != "holdfwd") && (Command != "holdup")
value = ***1

Flying away state.

[Statedef ***3]
type = A
movetype = I
physics = N
anim = ***3
ctrl = 1

Disables air guarding. If you wish to add in air guarding while flying, you can
remove this, then edit the guarding states accordingly, using Var(0) as reference.

[State ***3: AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAirGuard
ignorehitpause = 1

[State ***3: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State ***3: VelSet]
type = VelSet
trigger1 = (Whatever)
x = (FVar(0)*(-1))
y = (FVar(1)*(-1))

[State ***3: ChangeState]
type = ChangeState
trigger1 = (Command != "holdback") && (Command != "holddown")
value = ***1
« Last Edit: October 24, 2007, 10:12:22 PM by StarXS »



Offline A!

  • Novice Coder
  • Infinity Regular
  • ****
  • Posts: 1318
  • Country: United Kingdom gb
  • Last Login:August 03, 2019, 06:10:28 PM
  • Don't Hate If You Cant Create
Re: Flying code by Flowagirl
« Reply #1 on: September 28, 2007, 02:28:55 PM »
i was about to ask bout this thanks
A guy told me one time, "Don't let yourself get attached to anything you are not willing to walk out on in 30 seconds flat if you feel the heat around the corner."

Offline Aura-Master

  • Stage Creator
  • *****
  • Posts: 1620
  • Last Login:February 18, 2020, 03:22:18 AM
  • Animating anyone?
    • Email
Re: Flying code by Flowagirl
« Reply #2 on: September 28, 2007, 08:49:23 PM »
where do i put this code in my favorite character?
Currently in need of one

Offline John Jr.

  • Initiate
  • **
  • Posts: 13
  • Last Login:February 12, 2009, 02:34:57 PM
Re: Flying code by Flowagirl
« Reply #3 on: October 10, 2007, 12:16:47 AM »
where do i put this code in my favorite character?
I put the flying code in the cns, above the [Statedef -3]. It worked without problem.

« Last Edit: October 10, 2007, 01:03:48 AM by John Jr. »

Offline Violent Ken Masters

  • Contributor
  • ****
  • Posts: 4379
  • Last Login:April 17, 2017, 01:52:10 AM
  • WELCOME TO DIE!!!
    • Violent Ken's site
    • Email
Re: Flying code by Flowagirl
« Reply #4 on: October 14, 2007, 10:05:47 PM »
Do we just copy and paste or do we have to replace all the * with numbers and words?

Offline John Jr.

  • Initiate
  • **
  • Posts: 13
  • Last Login:February 12, 2009, 02:34:57 PM
Re: Flying code by Flowagirl
« Reply #5 on: October 18, 2007, 09:48:11 AM »
Do we just copy and paste or do we have to replace all the * with numbers and words?
You must substitute the * with the appropriate numbers, like the statedef numbers.

Offline nick09

  • Contributor
  • ****
  • Posts: 3481
  • Last Login:December 21, 2011, 10:16:38 PM
  • Avatar Credit to CD.
    • Nick09's creations
    • Email
Re: Flying code by Flowagirl
« Reply #6 on: October 21, 2007, 12:24:40 PM »
this should help some people out.. dont forget to credit FlowaGirl if you use this in your character. more tuts like this in the globe under my pic

Quote
---------------------------------------------------------------------------
The way flying works in Idainaru Densetsu is very simple; Pressing backward
or downwards on the directional keys move your character away from the
opponent, and forward or up to move towards. Your character will move in a
straight path.
---------------------------------------------------------------------------

The startup state.

[Statedef ****]
type = A
movetype = I
physics = N
anim = ****

[State ****: VarSet]
type = VarSet
trigger1 = (!Time)
var(0) = 1

[State ****: VelSet]
type = VelSet
trigger1 = (Time > 10)
y = -6

[State ****: VelAdd]
type = VelAdd
trigger1 = (Time > 10) && (Time, < y =" 0.40" type =" ChangeState" trigger1 =" (Time"> 30)
value = ***1

The flying state, when character is idle.

[Statedef ***1]
type = A
movetype = I
physics = N
anim = ***1
velset = 0,0
ctrl = 1

[State ***1: Turn]
type = Turn
trigger1 = (P2Dist X < -1)

This NULL is actually used to set a few variables at once, without actually having to use
that many VarSet's.
(Read Elecbyte's documentation on expressions.)

Var(0): The "You're flying" variable. You can use this to call upon when needed, such as
for the CMD file.

Var(1) and Var(2): Used for the floating effect.

[State ***1: Null]
type = Null
trigger1 = (!Time)
trigger1 = (Var(1) := 0) && (Var(0) := 1)
trigger2 = (Var(1) = -10) || (Var(1) = 10)
trigger2 = (Var(2) := IfElse(Var(1) = -10,0,1))

[State ***1: VarAdd]
type = VarAdd
trigger1 = 1
var(1) = IfElse(Var(2) = 0,1,-1)

[State ***1: VelAdd]
type = VelAdd
trigger1 = 1
y = IfElse(Var(2) = 1,0.05,-0.05)

***2 is the moving towards state, and ***3 for away.

[State ***1: ChangeState]
type = ChangeState
trigger1 = (Command = "holdup") || (Command = "holdfwd")
value = ***2

[State ***1: ChangeState]
type = ChangeState
trigger1 = (Command = "holddown") || (Command = "holdback")
value = ***3

Flying towards state.

[Statedef ***2]
type = A
movetype = I
physics = N
anim = ***2
ctrl = 1

This is used to check the position of the enemy, and sets the appropriate values to
move towards him/her.

FVar(0): X velocity
FVar(1): Y velocity

[State ***2: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

Moves the character, using the variables as reference. You cannot use those expressions
as shown above and put it directly into the VelSet. MUGEN will lock up after this is used
a number of times.

[State ***2: VelSet]
type = VelSet
trigger1 = (Whatever)
x = FVar(0)
y = FVar(1)

Go back to the idle state when commands are released.

[State ***2: ChangeState]
type = ChangeState
trigger1 = (Command != "holdfwd") && (Command != "holdup")
value = ***1

Flying away state.

[Statedef ***3]
type = A
movetype = I
physics = N
anim = ***3
ctrl = 1

Disables air guarding. If you wish to add in air guarding while flying, you can
remove this, then edit the guarding states accordingly, using Var(0) as reference.

[State ***3: AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAirGuard
ignorehitpause = 1

[State ***3: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State ***3: VelSet]
type = VelSet
trigger1 = (Whatever)
x = (FVar(0)*(-1))
y = (FVar(1)*(-1))

[State ***3: ChangeState]
type = ChangeState
trigger1 = (Command != "holdback") && (Command != "holddown")
value = ***1

um starxs disable smilieys. via the Additional Options.

which i did just now.

Offline StarXS

  • Infinity Regular
  • ****
  • Posts: 561
  • Last Login:March 07, 2008, 09:43:28 PM
  • Legionnaire
    • Mugen Battle Network Blog
    • Email
Re: Flying code by Flowagirl
« Reply #7 on: October 24, 2007, 10:13:34 PM »
^^ thanks nick, disabled smilies in the 1st post

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Flying code by Flowagirl
« Reply #8 on: October 24, 2007, 11:11:38 PM »
can someone help me?
ive done everything accordingly to the tut and i keep getting this error



code:

;-----------------FLying------------------------------------------------------------------
[Statedef 1001]
type = A
movetype = I
physics = N
anim = 1001

[State 1001: VarSet]
type = VarSet
trigger1 = (!Time)
var(0) = 1

[State 1001: VelSet]
type = VelSet
trigger1 = (Time > 10)
y = -6

[State 1001: VelAdd]
type = VelAdd
trigger1 = (Time > 10) && (Time, < y =" 0.40" type =" ChangeState" trigger1 =" (Time"> 30)
value = 1002

;---------------

[Statedef 1002]
type = A
movetype = I
physics = N
anim = 1002
velset = 0,0
ctrl = 1

[State 1002: Turn]
type = Turn
trigger1 = (P2Dist X < -1)

[State 1002: Null]
type = Null
trigger1 = (!Time)
trigger1 = (Var(1) := 0) && (Var(0) := 1)
trigger2 = (Var(1) = -10) || (Var(1) = 10)
trigger2 = (Var(2) := IfElse(Var(1) = -10,0,1))

[State 1002: VarAdd]
type = VarAdd
trigger1 = 1
var(1) = IfElse(Var(2) = 0,1,-1)

[State 1002: VelAdd]
type = VelAdd
trigger1 = 1
y = IfElse(Var(2) = 1,0.05,-0.05)

[State 1002: ChangeState]
type = ChangeState
trigger1 = (Command = "holdup") || (Command = "holdfwd")
value = 1003

[State 1001: ChangeState]
type = ChangeState
trigger1 = (Command = "holddown") || (Command = "holdback")
value = 1004

;-----------------------------------------
 [Statedef 1003]
type = A
movetype = I
physics = N
anim = 1003
ctrl = 1

[State 1003: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State 1003: VelSet]
type = VelSet
trigger1 = (time=0)
x = FVar(0)
y = FVar(1)

[State 1003: ChangeState]
type = ChangeState
trigger1 = (Command != "holdfwd") && (Command != "holdup")
value = 1001

;-------------------------------------------
[Statedef 1004]
type = A
movetype = I
physics = N
anim = 1004
ctrl = 1

[State 1004: AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAirGuard
ignorehitpause = 1

[State 1004: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State 1004: VelSet]
type = VelSet
trigger1 = (time=0)
x = (FVar(0)*(-1))
y = (FVar(1)*(-1))

[State 1004: ChangeState]
type = ChangeState
trigger1 = (Command != "holdback") && (Command != "holddown")
value = 1002


Offline StarXS

  • Infinity Regular
  • ****
  • Posts: 561
  • Last Login:March 07, 2008, 09:43:28 PM
  • Legionnaire
    • Mugen Battle Network Blog
    • Email
Re: Flying code by Flowagirl
« Reply #9 on: October 25, 2007, 12:03:47 AM »
can someone help me?
ive done everything accordingly to the tut and i keep getting this error



code:

;-----------------FLying------------------------------------------------------------------
[Statedef 1001]
type = A
movetype = I
physics = N
anim = 1001

[State 1001: VarSet]
type = VarSet
trigger1 = (!Time)
var(0) = 1

[State 1001: VelSet]
type = VelSet
trigger1 = (Time > 10)
y = -6

[State 1001: VelAdd]
type = VelAdd
trigger1 = (Time > 10) && (Time, < y =" 0.40" type =" ChangeState" trigger1 =" (Time"> 30)
value = 1002

;---------------

[Statedef 1002]
type = A
movetype = I
physics = N
anim = 1002
velset = 0,0
ctrl = 1

[State 1002: Turn]
type = Turn
trigger1 = (P2Dist X < -1)

[State 1002: Null]
type = Null
trigger1 = (!Time)
trigger1 = (Var(1) := 0) && (Var(0) := 1)
trigger2 = (Var(1) = -10) || (Var(1) = 10)
trigger2 = (Var(2) := IfElse(Var(1) = -10,0,1))

[State 1002: VarAdd]
type = VarAdd
trigger1 = 1
var(1) = IfElse(Var(2) = 0,1,-1)

[State 1002: VelAdd]
type = VelAdd
trigger1 = 1
y = IfElse(Var(2) = 1,0.05,-0.05)

[State 1002: ChangeState]
type = ChangeState
trigger1 = (Command = "holdup") || (Command = "holdfwd")
value = 1003

[State 1001: ChangeState]
type = ChangeState
trigger1 = (Command = "holddown") || (Command = "holdback")
value = 1004

;-----------------------------------------
 [Statedef 1003]
type = A
movetype = I
physics = N
anim = 1003
ctrl = 1

[State 1003: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State 1003: VelSet]
type = VelSet
trigger1 = (time=0)
x = FVar(0)
y = FVar(1)

[State 1003: ChangeState]
type = ChangeState
trigger1 = (Command != "holdfwd") && (Command != "holdup")
value = 1001

;-------------------------------------------
[Statedef 1004]
type = A
movetype = I
physics = N
anim = 1004
ctrl = 1

[State 1004: AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAirGuard
ignorehitpause = 1

[State 1004: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State 1004: VelSet]
type = VelSet
trigger1 = (time=0)
x = (FVar(0)*(-1))
y = (FVar(1)*(-1))

[State 1004: ChangeState]
type = ChangeState
trigger1 = (Command != "holdback") && (Command != "holddown")
value = 1002



did you try this? I've added it to a couple of characters this way

where do i put this code in my favorite character?
I put the flying code in the cns, above the [Statedef -3]. It worked without problem.



Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Flying code by Flowagirl
« Reply #10 on: October 25, 2007, 12:19:35 AM »
can someone help me?
ive done everything accordingly to the tut and i keep getting this error



code:

;-----------------FLying------------------------------------------------------------------
[Statedef 1001]
type = A
movetype = I
physics = N
anim = 1001

[State 1001: VarSet]
type = VarSet
trigger1 = (!Time)
var(0) = 1

[State 1001: VelSet]
type = VelSet
trigger1 = (Time > 10)
y = -6

[State 1001: VelAdd]
type = VelAdd
trigger1 = (Time > 10) && (Time, < y =" 0.40" type =" ChangeState" trigger1 =" (Time"> 30)
value = 1002

;---------------

[Statedef 1002]
type = A
movetype = I
physics = N
anim = 1002
velset = 0,0
ctrl = 1

[State 1002: Turn]
type = Turn
trigger1 = (P2Dist X < -1)

[State 1002: Null]
type = Null
trigger1 = (!Time)
trigger1 = (Var(1) := 0) && (Var(0) := 1)
trigger2 = (Var(1) = -10) || (Var(1) = 10)
trigger2 = (Var(2) := IfElse(Var(1) = -10,0,1))

[State 1002: VarAdd]
type = VarAdd
trigger1 = 1
var(1) = IfElse(Var(2) = 0,1,-1)

[State 1002: VelAdd]
type = VelAdd
trigger1 = 1
y = IfElse(Var(2) = 1,0.05,-0.05)

[State 1002: ChangeState]
type = ChangeState
trigger1 = (Command = "holdup") || (Command = "holdfwd")
value = 1003

[State 1001: ChangeState]
type = ChangeState
trigger1 = (Command = "holddown") || (Command = "holdback")
value = 1004

;-----------------------------------------
 [Statedef 1003]
type = A
movetype = I
physics = N
anim = 1003
ctrl = 1

[State 1003: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State 1003: VelSet]
type = VelSet
trigger1 = (time=0)
x = FVar(0)
y = FVar(1)

[State 1003: ChangeState]
type = ChangeState
trigger1 = (Command != "holdfwd") && (Command != "holdup")
value = 1001

;-------------------------------------------
[Statedef 1004]
type = A
movetype = I
physics = N
anim = 1004
ctrl = 1

[State 1004: AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAirGuard
ignorehitpause = 1

[State 1004: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State 1004: VelSet]
type = VelSet
trigger1 = (time=0)
x = (FVar(0)*(-1))
y = (FVar(1)*(-1))

[State 1004: ChangeState]
type = ChangeState
trigger1 = (Command != "holdback") && (Command != "holddown")
value = 1002



did you try this? I've added it to a couple of characters this way

where do i put this code in my favorite character?
I put the flying code in the cns, above the [Statedef -3]. It worked without problem.


um.. duh?..lol..

Offline nick09

  • Contributor
  • ****
  • Posts: 3481
  • Last Login:December 21, 2011, 10:16:38 PM
  • Avatar Credit to CD.
    • Nick09's creations
    • Email
Re: Flying code by Flowagirl
« Reply #11 on: October 26, 2007, 07:44:03 PM »
can someone help me?
ive done everything accordingly to the tut and i keep getting this error



code:

;-----------------FLying------------------------------------------------------------------
[Statedef 1001]
type = A
movetype = I
physics = N
anim = 1001

[State 1001: VarSet]
type = VarSet
trigger1 = (!Time)
var(0) = 1

[State 1001: VelSet]
type = VelSet
trigger1 = (Time > 10)
y = -6

[State 1001: VelAdd]
type = VelAdd
trigger1 = (Time > 10) && (Time, < y =" 0.40" type =" ChangeState" trigger1 =" (Time"> 30)
value = 1002

;---------------

[Statedef 1002]
type = A
movetype = I
physics = N
anim = 1002
velset = 0,0
ctrl = 1

[State 1002: Turn]
type = Turn
trigger1 = (P2Dist X < -1)

[State 1002: Null]
type = Null
trigger1 = (!Time)
trigger1 = (Var(1) := 0) && (Var(0) := 1)
trigger2 = (Var(1) = -10) || (Var(1) = 10)
trigger2 = (Var(2) := IfElse(Var(1) = -10,0,1))

[State 1002: VarAdd]
type = VarAdd
trigger1 = 1
var(1) = IfElse(Var(2) = 0,1,-1)

[State 1002: VelAdd]
type = VelAdd
trigger1 = 1
y = IfElse(Var(2) = 1,0.05,-0.05)

[State 1002: ChangeState]
type = ChangeState
trigger1 = (Command = "holdup") || (Command = "holdfwd")
value = 1003

[State 1001: ChangeState]
type = ChangeState
trigger1 = (Command = "holddown") || (Command = "holdback")
value = 1004

;-----------------------------------------
 [Statedef 1003]
type = A
movetype = I
physics = N
anim = 1003
ctrl = 1

[State 1003: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State 1003: VelSet]
type = VelSet
trigger1 = (time=0)
x = FVar(0)
y = FVar(1)

[State 1003: ChangeState]
type = ChangeState
trigger1 = (Command != "holdfwd") && (Command != "holdup")
value = 1001

;-------------------------------------------
[Statedef 1004]
type = A
movetype = I
physics = N
anim = 1004
ctrl = 1

[State 1004: AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAirGuard
ignorehitpause = 1

[State 1004: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State 1004: VelSet]
type = VelSet
trigger1 = (time=0)
x = (FVar(0)*(-1))
y = (FVar(1)*(-1))

[State 1004: ChangeState]
type = ChangeState
trigger1 = (Command != "holdback") && (Command != "holddown")
value = 1002



did you try this? I've added it to a couple of characters this way

where do i put this code in my favorite character?
I put the flying code in the cns, above the [Statedef -3]. It worked without problem.


um.. duh?..lol..

well the error is in this line of code
trigger1 = (Time > 10) && (Time, < y =" 0.40" type =" ChangeState" trigger1 =" (Time"> 30)

try changing the y=" 0.40" to y=" 1"

because i don't think mugen allows periods for EXAMPLE: 1.1   

Offline Violent Ken Masters

  • Contributor
  • ****
  • Posts: 4379
  • Last Login:April 17, 2017, 01:52:10 AM
  • WELCOME TO DIE!!!
    • Violent Ken's site
    • Email
Re: Flying code by Flowagirl
« Reply #12 on: October 28, 2007, 04:35:36 AM »
can someone help me?
ive done everything accordingly to the tut and i keep getting this error



code:

;-----------------FLying------------------------------------------------------------------
[Statedef 1001]
type = A
movetype = I
physics = N
anim = 1001

[State 1001: VarSet]
type = VarSet
trigger1 = (!Time)
var(0) = 1

[State 1001: VelSet]
type = VelSet
trigger1 = (Time > 10)
y = -6

[State 1001: VelAdd]
type = VelAdd
trigger1 = (Time > 10) && (Time, < y =" 0.40" type =" ChangeState" trigger1 =" (Time"> 30)
value = 1002

;---------------

[Statedef 1002]
type = A
movetype = I
physics = N
anim = 1002
velset = 0,0
ctrl = 1

[State 1002: Turn]
type = Turn
trigger1 = (P2Dist X < -1)

[State 1002: Null]
type = Null
trigger1 = (!Time)
trigger1 = (Var(1) := 0) && (Var(0) := 1)
trigger2 = (Var(1) = -10) || (Var(1) = 10)
trigger2 = (Var(2) := IfElse(Var(1) = -10,0,1))

[State 1002: VarAdd]
type = VarAdd
trigger1 = 1
var(1) = IfElse(Var(2) = 0,1,-1)

[State 1002: VelAdd]
type = VelAdd
trigger1 = 1
y = IfElse(Var(2) = 1,0.05,-0.05)

[State 1002: ChangeState]
type = ChangeState
trigger1 = (Command = "holdup") || (Command = "holdfwd")
value = 1003

[State 1001: ChangeState]
type = ChangeState
trigger1 = (Command = "holddown") || (Command = "holdback")
value = 1004

;-----------------------------------------
 [Statedef 1003]
type = A
movetype = I
physics = N
anim = 1003
ctrl = 1

[State 1003: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State 1003: VelSet]
type = VelSet
trigger1 = (time=0)
x = FVar(0)
y = FVar(1)

[State 1003: ChangeState]
type = ChangeState
trigger1 = (Command != "holdfwd") && (Command != "holdup")
value = 1001

;-------------------------------------------
[Statedef 1004]
type = A
movetype = I
physics = N
anim = 1004
ctrl = 1

[State 1004: AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAirGuard
ignorehitpause = 1

[State 1004: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State 1004: VelSet]
type = VelSet
trigger1 = (time=0)
x = (FVar(0)*(-1))
y = (FVar(1)*(-1))

[State 1004: ChangeState]
type = ChangeState
trigger1 = (Command != "holdback") && (Command != "holddown")
value = 1002



did you try this? I've added it to a couple of characters this way

where do i put this code in my favorite character?
I put the flying code in the cns, above the [Statedef -3]. It worked without problem.


um.. duh?..lol..

well the error is in this line of code
trigger1 = (Time > 10) && (Time, < y =" 0.40" type =" ChangeState" trigger1 =" (Time"> 30)

try changing the y=" 0.40" to y=" 1"

because i don't think mugen allows periods for EXAMPLE: 1.1   
I thought it allowed periods, because my power rangers sizes are set to x=1.71 and y=1.71

Offline nick09

  • Contributor
  • ****
  • Posts: 3481
  • Last Login:December 21, 2011, 10:16:38 PM
  • Avatar Credit to CD.
    • Nick09's creations
    • Email
Re: Flying code by Flowagirl
« Reply #13 on: October 28, 2007, 08:15:34 AM »
can someone help me?
ive done everything accordingly to the tut and i keep getting this error



code:

;-----------------FLying------------------------------------------------------------------
[Statedef 1001]
type = A
movetype = I
physics = N
anim = 1001

[State 1001: VarSet]
type = VarSet
trigger1 = (!Time)
var(0) = 1

[State 1001: VelSet]
type = VelSet
trigger1 = (Time > 10)
y = -6

[State 1001: VelAdd]
type = VelAdd
trigger1 = (Time > 10) && (Time, < y =" 0.40" type =" ChangeState" trigger1 =" (Time"> 30)
value = 1002

;---------------

[Statedef 1002]
type = A
movetype = I
physics = N
anim = 1002
velset = 0,0
ctrl = 1

[State 1002: Turn]
type = Turn
trigger1 = (P2Dist X < -1)

[State 1002: Null]
type = Null
trigger1 = (!Time)
trigger1 = (Var(1) := 0) && (Var(0) := 1)
trigger2 = (Var(1) = -10) || (Var(1) = 10)
trigger2 = (Var(2) := IfElse(Var(1) = -10,0,1))

[State 1002: VarAdd]
type = VarAdd
trigger1 = 1
var(1) = IfElse(Var(2) = 0,1,-1)

[State 1002: VelAdd]
type = VelAdd
trigger1 = 1
y = IfElse(Var(2) = 1,0.05,-0.05)

[State 1002: ChangeState]
type = ChangeState
trigger1 = (Command = "holdup") || (Command = "holdfwd")
value = 1003

[State 1001: ChangeState]
type = ChangeState
trigger1 = (Command = "holddown") || (Command = "holdback")
value = 1004

;-----------------------------------------
 [Statedef 1003]
type = A
movetype = I
physics = N
anim = 1003
ctrl = 1

[State 1003: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State 1003: VelSet]
type = VelSet
trigger1 = (time=0)
x = FVar(0)
y = FVar(1)

[State 1003: ChangeState]
type = ChangeState
trigger1 = (Command != "holdfwd") && (Command != "holdup")
value = 1001

;-------------------------------------------
[Statedef 1004]
type = A
movetype = I
physics = N
anim = 1004
ctrl = 1

[State 1004: AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAirGuard
ignorehitpause = 1

[State 1004: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 8) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State 1004: VelSet]
type = VelSet
trigger1 = (time=0)
x = (FVar(0)*(-1))
y = (FVar(1)*(-1))

[State 1004: ChangeState]
type = ChangeState
trigger1 = (Command != "holdback") && (Command != "holddown")
value = 1002



did you try this? I've added it to a couple of characters this way

where do i put this code in my favorite character?
I put the flying code in the cns, above the [Statedef -3]. It worked without problem.


um.. duh?..lol..

well the error is in this line of code
trigger1 = (Time > 10) && (Time, < y =" 0.40" type =" ChangeState" trigger1 =" (Time"> 30)

try changing the y=" 0.40" to y=" 1"

because i don't think mugen allows periods for EXAMPLE: 1.1   
I thought it allowed periods, because my power rangers sizes are set to x=1.71 and y=1.71

well the error he has is in this line of code:
trigger1 = (Time > 10) && (Time, < y =" 0.40" type =" ChangeState" trigger1 =" (Time"> 30)

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Flying code by Flowagirl
« Reply #14 on: October 28, 2007, 10:17:39 AM »
I think the error is that you are using these " ", and you dont have to


sig made by shullbocka

Offline A!

  • Novice Coder
  • Infinity Regular
  • ****
  • Posts: 1318
  • Country: United Kingdom gb
  • Last Login:August 03, 2019, 06:10:28 PM
  • Don't Hate If You Cant Create
Re: Flying code by Flowagirl
« Reply #15 on: October 29, 2007, 05:55:33 PM »
I think the error is that you are using these " ", and you dont have to


yea
A guy told me one time, "Don't let yourself get attached to anything you are not willing to walk out on in 30 seconds flat if you feel the heat around the corner."

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Flying code by Flowagirl
« Reply #16 on: October 29, 2007, 06:01:16 PM »
I think the error is that you are using these " ", and you dont have to


yea
works now.. but all he does is go up..
help anyone?

Offline A!

  • Novice Coder
  • Infinity Regular
  • ****
  • Posts: 1318
  • Country: United Kingdom gb
  • Last Login:August 03, 2019, 06:10:28 PM
  • Don't Hate If You Cant Create
Re: Flying code by Flowagirl
« Reply #17 on: October 29, 2007, 06:11:04 PM »
I think the error is that you are using these " ", and you dont have to


yea
works now.. but all he does is go up..
help anyone?

 :-?? i think the stars shouldnt be there too or did use already know that
A guy told me one time, "Don't let yourself get attached to anything you are not willing to walk out on in 30 seconds flat if you feel the heat around the corner."

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Flying code by Flowagirl
« Reply #18 on: October 29, 2007, 11:42:31 PM »
these code make the char fly only diagonal, you need to edit the codes changing these things

[State 1002: ChangeState]
type = ChangeState
trigger1 = (Command = "holdup") || (Command = "holdfwd")
value = 1003

make a state for up, and make a state for fwrd

[State 1001: ChangeState]
type = ChangeState
trigger1 = (Command = "holddown") || (Command = "holdback")
value = 1004

the same here

try editing the velset, for something easier to make for example if you are changin the holdup state put in the velset x=0 and y = - 4 (change the number but use a negative value wich means that the char will go up)


sig made by shullbocka

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

* IMT Calendar

April 2024
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
[28] 29 30

SimplePortal 2.3.5 © 2008-2012, SimplePortal