Infinity MUGEN Team

IMT Main => M.U.G.E.N Guides & Tutorials => Topic started by: StarXS on September 28, 2007, 01:28:42 PM

Title: Flying code by Flowagirl
Post by: StarXS 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
Title: Re: Flying code by Flowagirl
Post by: A! on September 28, 2007, 02:28:55 PM
i was about to ask bout this thanks
Title: Re: Flying code by Flowagirl
Post by: Aura-Master on September 28, 2007, 08:49:23 PM
where do i put this code in my favorite character?
Title: Re: Flying code by Flowagirl
Post by: John Jr. 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.

Title: Re: Flying code by Flowagirl
Post by: Violent Ken Masters 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?
Title: Re: Flying code by Flowagirl
Post by: John Jr. 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.
Title: Re: Flying code by Flowagirl
Post by: nick09 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.
Title: Re: Flying code by Flowagirl
Post by: StarXS on October 24, 2007, 10:13:34 PM
^^ thanks nick, disabled smilies in the 1st post
Title: Re: Flying code by Flowagirl
Post by: Luis/Dshiznet 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

(http://img148.imageshack.us/img148/3223/errormugengg2.png)

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

Title: Re: Flying code by Flowagirl
Post by: StarXS 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

(http://img148.imageshack.us/img148/3223/errormugengg2.png)

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.


Title: Re: Flying code by Flowagirl
Post by: Luis/Dshiznet 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

(http://img148.imageshack.us/img148/3223/errormugengg2.png)

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..
Title: Re: Flying code by Flowagirl
Post by: nick09 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

(http://img148.imageshack.us/img148/3223/errormugengg2.png)

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   
Title: Re: Flying code by Flowagirl
Post by: Violent Ken Masters 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

(http://img148.imageshack.us/img148/3223/errormugengg2.png)

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
Title: Re: Flying code by Flowagirl
Post by: nick09 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

(http://img148.imageshack.us/img148/3223/errormugengg2.png)

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)
Title: Re: Flying code by Flowagirl
Post by: Fallen_Angel on October 28, 2007, 10:17:39 AM
I think the error is that you are using these " ", and you dont have to
Title: Re: Flying code by Flowagirl
Post by: A! on October 29, 2007, 05:55:33 PM
I think the error is that you are using these " ", and you dont have to


yea
Title: Re: Flying code by Flowagirl
Post by: Luis/Dshiznet 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?
Title: Re: Flying code by Flowagirl
Post by: A! 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
Title: Re: Flying code by Flowagirl
Post by: Fallen_Angel 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)
SimplePortal 2.3.5 © 2008-2012, SimplePortal