The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Code Library => Topic started by: demongorne on February 25, 2015, 12:36:16 pm

Title: how to create dizzy stars effect
Post by: demongorne on February 25, 2015, 12:36:16 pm
hey there I would like to  code a dizzy stars effect on my cvs pro chars can you tell me the easier way to do?
Title: Re: how to create dizzy stars effect
Post by: Jesuszilla on February 25, 2015, 06:58:14 pm
You're in luck, I actually made a code-based solution to handle the layering, scaling, and rotation for the tiles! It even correctly binds when you push the character.



Unfortunately I'm on break at work right now, but I'll provide the resources when I get back home (if I remember).
Title: Re: how to create dizzy stars effect
Post by: demongorne on February 25, 2015, 09:55:31 pm
This should be great man also I'm having some problems to code the power bar more exactly to scale the inner  bar in statesdef 6130 & 6100, I've send you  a P.M.

Title: Re: how to create dizzy stars effect
Post by: Jesuszilla on February 27, 2015, 06:29:55 am
The resources (text file contains all the info): http://www.trinitymugen.net/~Creator/Jesuszilla/dizzycode.zip


They may need some adjustments depending on the character width, but I'll try to figure something out.
Title: Re: how to create dizzy stars effect
Post by: demongorne on February 27, 2015, 01:29:11 pm
I added your code but it doesn't work the sprites 5300 is not display at all when the opponent is hitting....
Title: Re: how to create dizzy stars effect
Post by: Jesuszilla on February 27, 2015, 04:24:10 pm
That's because they appear on P1 when they get dizzied. I made this so my characters would use their own dizzy sound and effects. Test on your own characters first; it'll take some adjustment to display them on P2 due to how the code is structured.
Title: Re: how to create dizzy stars effect
Post by: demongorne on February 27, 2015, 04:59:52 pm
Can you tell me what parameter I have change to make work it on p2?
I checked out your code but it doesn't work  neither in p1 nor in p2 
Title: Re: how to create dizzy stars effect
Post by: Jesuszilla on February 27, 2015, 11:46:45 pm
I busted my ass updating this because I also wanted to get it to "scale" according to character width:

Code:
;---------------------------------------------------------------------------
; Dizzy FX
[Statedef 777]
ctrl = 0
anim = 1
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "Pos X = %f, fvar(0) = %f\nP2Pos X = %f"
params = Pos X, fvar(0), (enemyNear(0),Pos X)
;ignorehitpause =
;persistent =

[State 777, VarSet]
type = VarSet
trigger1 = !Time
var(0) = enemyNear(0), Const(size.head.pos.X)
[State 777, VarSet]
type = VarSet
trigger1 = !Time
var(1) = ifElse(var(0) < 0,-1,1)
[State 777, VarSet]
type = VarSet
trigger1 = 1
var(2) = enemyNear(0),facing

[State 30000, PosSet]
type = VarSet
trigger1 = 1
fvar(0) = ifElse((Pos X - enemyNear(0), Pos X) != Var(0), -Var(2)*(Pos X - enemyNear(0), Pos X - Var(2)*Var(0)), 0)
[State 30000, PosSet]
type = PosAdd
trigger1 = FVar(0)
x = FVar(0)
;y = root, Pos Y
ignorehitpause = 1

[State 777, Helper]
type = Helper
trigger1 = Time = 0
helperType = normal
name = "birdie"
ID = 778
pos = -Const(Size.Ground.Back),0;-18,0
postype = p1
facing = 1
StateNo = 778
keyctrl = 1
ownpal = 1
supermoveTime = 65535
pausemoveTime = 65535
[State 777, Helper]
type = Helper
trigger1 = Time = 0
helperType = normal
name = "birdie2"
ID = 779
pos = Const(Size.Ground.Front),0;25,-1
postype = p1
facing = 1
StateNo = 779
keyctrl = 1
ownpal = 1
supermoveTime = 65535
pausemoveTime = 65535
[State 777, Helper]
type = Helper
trigger1 = Time = 0
helperType = normal
name = "star"
ID = 780
pos = -2,5
postype = p1
facing = 1
StateNo = 780
keyctrl = 1
ownpal = 1
supermoveTime = 65535
pausemoveTime = 65535
[State 777, Helper]
type = Helper
trigger1 = Time = 0
helperType = normal
name = "star2"
ID = 781
pos = 0,-10
postype = p1
facing = 1
StateNo = 781
keyctrl = 1
ownpal = 1
supermoveTime = 65535
pausemoveTime = 65535

[State 777, PlaySnd]
type = PlaySnd
trigger1 = !Time
trigger1 = Var(10) := root,Var(10)
value = S3050,ifElse(Var(10)<4,0,1) ; Play Capcom sound for Capcom grooves, and the SNK sound for SNK grooves
[State 0, DestroySelf]
type = DestroySelf
trigger1 = !root,numTarget
trigger2 = root,HitPauseTime > 0
;.4375 = smallest scale
;--------------
[StateDef 778]
ctrl = 0
anim = 778
[State 777, VarSet]
type = null
trigger1 = fvar(0) := pi/50*time
trigger1 = fvar(1) := .4375+(.1*sin(FVar(0)))
[State 777, PosSet] ; If I can get it to freeze, I can get it to move
type = PosAdd
trigger1 = parent, FVar(0)
x = parent, FVar(0)
[State 777, VelSet]
type = VelSet
trigger1 = 1
x = Const(Size.Ground.Front)*sin(FVar(0))/16.0;16*(FVar(1)-.4375);2*sin(pi/50*time)
y = -cos(FVar(0)-pi)/2;.5*(FVar(0)-.4375)
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 7.2*Time
scale = FVar(1),FVar(1)
[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = ifElse((FVar(1)<=.40),-1,3)
ignorehitpause = 1
[State 0, DestroySelf]
type = DestroySelf
trigger1 = !root,numTarget
trigger2 = root,HitPauseTime > 0
;--------------
[StateDef 779]
ctrl = 0
anim = 778
[State 777, VarSet]
type = null
trigger1 = fvar(0) := pi/50*(time+50)
trigger1 = fvar(1) := .4375+(.1*sin(FVar(0)))
[State 777, PosSet] ; If I can get it to freeze, I can get it to move
type = PosAdd
trigger1 = parent, FVar(0)
x = parent, FVar(0)
[State 777, VelSet]
type = VelSet
trigger1 = 1
x = Const(Size.Ground.Front)*sin(FVar(0))/16.0;Const(Size.Ground.Front)*(FVar(1)-.4375);2*sin(pi/50*time+50)
y = -cos(FVar(0)-pi)/2;.5*(FVar(0)-.4375)
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 7.2*(Time+24)
scale = FVar(1),FVar(1)
[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = ifElse((FVar(1)<=.40),-1,3)
[State 0, DestroySelf]
type = DestroySelf
trigger1 = !root,numTarget
trigger2 = root,HitPauseTime > 0
;--------------
[StateDef 780]
ctrl = 0
anim = 777
[State 777, VarSet]
type = null
trigger1 = fvar(0) := pi/50*(time+25)
trigger1 = fvar(1) := .4375+(.1*sin(FVar(0)))
[State 777, PosSet] ; If I can get it to freeze, I can get it to move
type = PosAdd
trigger1 = parent, FVar(0)
x = parent, FVar(0)
[State 777, VelSet]
type = VelSet
trigger1 = 1
x = Const(Size.Ground.Front)*sin(FVar(0))/16.0;16*(FVar(1)-.4375);2*sin(pi/50*time+50)
y = -cos(FVar(0)-pi)/2;.5*(FVar(0)-.4375)
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 7.2*(Time+12)
scale = FVar(1),FVar(1)
[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = ifElse((FVar(1)<=.40),-1,3)
[State 0, DestroySelf]
type = DestroySelf
trigger1 = !root,numTarget
trigger2 = root,HitPauseTime > 0
;--------------
[StateDef 781]
ctrl = 0
anim = 777
[State 777, VarSet]
type = null
trigger1 = fvar(0) := pi/50*(time+75)
trigger1 = fvar(1) := .4375+(.1*sin(FVar(0)))
[State 777, PosSet] ; If I can get it to freeze, I can get it to move
type = PosAdd
trigger1 = parent, FVar(0)
x = parent, FVar(0)
[State 777, VelSet]
type = VelSet
trigger1 = 1
x = Const(Size.Ground.Front)*sin(FVar(0))/16.0;16*(FVar(1)-.4375);2*sin(pi/50*time+50)
y = -cos(FVar(0)-pi)/2;.5*(FVar(0)-.4375)
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 7.2*(Time+36)
scale = FVar(1),FVar(1)
[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = ifElse((FVar(1)<=.40),-1,3)
[State 0, DestroySelf]
type = DestroySelf
trigger1 = !root,numTarget
trigger2 = root,HitPauseTime > 0

In -2:
Code:
;----------------------------------------------------------------------------------
; Dizzy FX
[State -2]
type = Helper
triggerall = NumTarget
trigger1 = !NumHelper(777)
trigger1 = RoundState = 2
trigger1 = target, Anim = 5300
helperType = normal
name = "dizzy"
ID = 777
pos = (enemyNear(0),Const(size.head.pos.X)),(enemyNear(0),Const(size.head.pos.Y))
size.xscale = 1
size.yscale = 1
size.ground.front = 16+enemyNear(0), Const(Size.Ground.Front)
size.ground.back = 16+enemyNear(0), Const(Size.Ground.Front) ;This is intentional
postype = p2
facing = 1
StateNo = 777
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

Result:
(http://i116.photobucket.com/albums/o19/Yesujira/mugen701_zpsfk8kk874.png)
(http://i116.photobucket.com/albums/o19/Yesujira/mugen702_zpsfrl32rtp.png)


If you don't want it to scale to enemy width for whatever reason, all you have to do is change the size.ground.front and the size.ground.back in the helper call to a constant.
Title: Re: how to create dizzy stars effect
Post by: JustNoPoint on February 27, 2015, 11:53:08 pm
That's awesome. Throw this bad boy into a code snippet board too JZ!
Title: Re: how to create dizzy stars effect
Post by: Jesuszilla on February 28, 2015, 01:28:12 am
Updated the code in the post. It's fully functional now!
Title: Re: how to create dizzy stars effect
Post by: demongorne on February 28, 2015, 11:49:11 am
I tried out this code on my char but won't work please can fixx this code directly on my char? I wanna have that when p2 is hitting continuosly by hp o hk (about 3/4 times in the original game)  fall on the ground get up and then goes in dizzy state ( I found this coding even in cvs2 rei's chars)
Title: Re: how to create dizzy stars effect
Post by: AlexSin on February 28, 2015, 12:28:26 pm
You're going off-topic in your own topic. :XD:
You can make a new topic asking how to code the dizzy state/s.

And answering to this: http://mugenguild.com/forum/msg.2087772
Yes, you're going off-topic. I bet you wanted to ask how to code all the dizzy state with the stars effect, but instead you only asked about the effect. I can read, you know.
Title: Re: how to create dizzy stars effect
Post by: Jesuszilla on March 01, 2015, 10:03:04 pm
you make me waste a lot of time for this code you could say it first

got this PM when I told him I wasn't coding a dizzy system. alright then.
Title: Re: how to create dizzy stars effect
Post by: AlexSin on March 01, 2015, 10:09:02 pm
It was his fault for not being clear in the first place.
Title: Re: how to create dizzy stars effect
Post by: demongorne on March 01, 2015, 10:15:56 pm
No I opened this topic and you offered to help me  to code Dizzy state anyway no matter I'll do this by myself
Title: Re: how to create dizzy stars effect
Post by: Jesuszilla on March 01, 2015, 10:19:14 pm
No, you mentioned the dizzy effects, which is what I helped with.
Title: Re: how to create dizzy stars effect
Post by: demongorne on March 01, 2015, 10:25:28 pm
Ok  there was a misunderstanding but I only say that the dizzy code doesn't work on my char
Title: Re: how to create dizzy stars effect
Post by: AlexSin on March 01, 2015, 11:38:19 pm
...but I only say that the dizzy code doesn't work on my char
hey there I would like to  code a dizzy stars effect on my cvs pro chars can you tell me the easier way to do?
I don't see you saying that. You asked the easiest way to code the "dizzy stars" effect.
I added your code but it doesn't work the sprites 5300 is not display at all when the opponent is hitting....
Here's where you showed your true colours. :P I knew you were actually asking about this + the effect, but this gave it away.


No I opened this topic and you offered to help me  to code Dizzy state anyway no matter I'll do this by myself
He never said that.
You're in luck, I actually made a code-based solution to handle the layering, scaling, and rotation for the tiles! It even correctly binds when you push the character.
His reply was an answer to the question: "can you tell me the easier way to [code the "dizzy stars" effect]?" and the "code based solution to handle the layering, scaling, and rotation for the tiles!" was referred to the stars and birds in the effect.
Title: Re: how to create dizzy stars effect
Post by: JustNoPoint on March 01, 2015, 11:45:46 pm
http://mugenguild.com/forum/msg.264664

Dizzy state is explained in the code archive.

I'm going to move this thread to the Code Library since the information is so useful.
Miscommunication aside, Thank you JZ for sharing this.

demongorne, this will still be useful once you get the dizzy state implemented.
If you have questions on the dizzy state code please make a new topic. I hope the info aids you and happy creating!
Title: Re: how to create dizzy stars effect
Post by: Jesuszilla on March 02, 2015, 06:26:34 am
Final version:
Capcom vs. SNK 2 dizzy FX. Tracks the position of the enemy! (uncomment the ifElse for FVar(1) if you want it to track Y position too)

Resources (tiles, animations): http://www.trinitymugen.net/~Creator/Jesuszilla/dizzycode.zip

Effect helpers:
Code:
;---------------------------------------------------------------------------
; Dizzy FX
[Statedef 777]
ctrl = 0
anim = 1
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "Pos X = %f, fvar(0) = %f\nP2Pos X = %f"
params = Pos X, fvar(0), (enemyNear(0),Pos X)
[State 777, Safeguard]
type = NotHitBy
trigger1 = 1
value = SCA
[State 777, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 777, VarSet]
type = VarSet
trigger1 = !Time
var(0) = EnemyNear(0), Const(Size.Head.Pos.X);root, Const(size.head.pos.X)
[State 777, VarSet]
type = VarSet
trigger1 = !Time
var(1) = EnemyNear(0), Const(Size.Head.Pos.Y)
[State 777, VarSet]
type = VarSet
trigger1 = 1
var(2) = EnemyNear(0), facing
[State 777, VarSet]
type = VarSet
trigger1 = 2
var(3) = ceil(Pos X - EnemyNear(0), Pos X)
[State 777, VarSet]
type = VarSet
trigger1 = 2
var(4) = ceil(Pos Y - EnemyNear(0), Pos Y)

[State 30000, Pos X]
type = VarSet
trigger1 = 1
fvar(0) = ifElse(Var(3) != Var(0), -Var(2)*(Var(3) - Var(2)*Var(0)), 0)
[State 30000, Pos Y]
type = VarSet
trigger1 = 1
fvar(1) = 0;ifElse(Var(4) != Var(1), (Var(1) - Var(4)), 0)
[State 30000, PosSet]
type = PosAdd
trigger1 = FVar(0) || FVar(1)
x = FVar(0)
y = FVar(1)
ignorehitpause = 1

[State 777, Helper]
type = Helper
trigger1 = Time = 0
helperType = normal
name = "birdie"
ID = 778
pos = -Const(Size.Ground.Back),0;-18,0
postype = p1
facing = 1
StateNo = 778
keyctrl = 1
ownpal = 1
supermoveTime = 65535
pausemoveTime = 65535
[State 777, Helper]
type = Helper
trigger1 = Time = 0
helperType = normal
name = "birdie2"
ID = 779
pos = Const(Size.Ground.Front),0;25,-1
postype = p1
facing = 1
StateNo = 779
keyctrl = 1
ownpal = 1
supermoveTime = 65535
pausemoveTime = 65535
[State 777, Helper]
type = Helper
trigger1 = Time = 0
helperType = normal
name = "star"
ID = 780
pos = -2,5
postype = p1
facing = 1
StateNo = 780
keyctrl = 1
ownpal = 1
supermoveTime = 65535
pausemoveTime = 65535
[State 777, Helper]
type = Helper
trigger1 = Time = 0
helperType = normal
name = "star2"
ID = 781
pos = 0,-10
postype = p1
facing = 1
StateNo = 781
keyctrl = 1
ownpal = 1
supermoveTime = 65535
pausemoveTime = 65535

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !root, NumTarget
trigger2 = root, HitPauseTime > 0
;.4375 = smallest scale
;--------------
[StateDef 778]
ctrl = 0
anim = 778
[State 777, Safeguard]
type = NotHitBy
trigger1 = 1
value = SCA
[State 777, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[State 777, VarSet]
type = null
trigger1 = fvar(0) := pi/50*time
trigger1 = fvar(1) := .4375+(.1*sin(FVar(0)))
[State 777, PosSet] ; If I can get it to freeze, I can get it to move
type = PosAdd
trigger1 = parent, FVar(0) || parent, FVar(1)
x = parent, FVar(0)
y = parent, FVar(1)
[State 777, VelSet]
type = VelSet
trigger1 = 1
x = Const(Size.Ground.Front)*sin(FVar(0))/16.0;16*(FVar(1)-.4375);2*sin(pi/50*time)
y = -cos(FVar(0)-pi)/2;.5*(FVar(0)-.4375)
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 7.2*Time
scale = FVar(1),FVar(1)
[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = ifElse((FVar(1)<=.40),-1,3)
ignorehitpause = 1
[State 0, DestroySelf]
type = DestroySelf
trigger1 = !root, NumTarget
trigger2 = root, HitPauseTime > 0
;--------------
[StateDef 779]
ctrl = 0
anim = 778
[State 777, Safeguard]
type = NotHitBy
trigger1 = 1
value = SCA
[State 777, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[State 777, VarSet]
type = null
trigger1 = fvar(0) := pi/50*(time+50)
trigger1 = fvar(1) := .4375+(.1*sin(FVar(0)))
[State 777, PosSet] ; If I can get it to freeze, I can get it to move
type = PosAdd
trigger1 = parent, FVar(0) || parent, FVar(1)
x = parent, FVar(0)
y = parent, FVar(1)
[State 777, VelSet]
type = VelSet
trigger1 = 1
x = Const(Size.Ground.Front)*sin(FVar(0))/16.0;Const(Size.Ground.Front)*(FVar(1)-.4375);2*sin(pi/50*time+50)
y = -cos(FVar(0)-pi)/2;.5*(FVar(0)-.4375)
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 7.2*(Time+24)
scale = FVar(1),FVar(1)
[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = ifElse((FVar(1)<=.40),-1,3)
[State 0, DestroySelf]
type = DestroySelf
trigger1 = !root, NumTarget
trigger2 = root, HitPauseTime > 0
;--------------
[StateDef 780]
ctrl = 0
anim = 777
[State 777, Safeguard]
type = NotHitBy
trigger1 = 1
value = SCA
[State 777, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[State 777, VarSet]
type = null
trigger1 = fvar(0) := pi/50*(time+25)
trigger1 = fvar(1) := .4375+(.1*sin(FVar(0)))
[State 777, PosSet] ; If I can get it to freeze, I can get it to move
type = PosAdd
trigger1 = parent, FVar(0) || parent, FVar(1)
x = parent, FVar(0)
y = parent, FVar(1)
[State 777, VelSet]
type = VelSet
trigger1 = 1
x = Const(Size.Ground.Front)*sin(FVar(0))/16.0;16*(FVar(1)-.4375);2*sin(pi/50*time+50)
y = -cos(FVar(0)-pi)/2;.5*(FVar(0)-.4375)
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 7.2*(Time+12)
scale = FVar(1),FVar(1)
[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = ifElse((FVar(1)<=.40),-1,3)
[State 0, DestroySelf]
type = DestroySelf
trigger1 = !root, NumTarget
trigger2 = root, HitPauseTime > 0
;--------------
[StateDef 781]
ctrl = 0
anim = 777
[State 777, Safeguard]
type = NotHitBy
trigger1 = 1
value = SCA
[State 777, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[State 777, VarSet]
type = null
trigger1 = fvar(0) := pi/50*(time+75)
trigger1 = fvar(1) := .4375+(.1*sin(FVar(0)))
[State 777, PosSet] ; If I can get it to freeze, I can get it to move
type = PosAdd
trigger1 = parent, FVar(0) || parent, FVar(1)
x = parent, FVar(0)
y = parent, FVar(1)
[State 777, VelSet]
type = VelSet
trigger1 = 1
x = Const(Size.Ground.Front)*sin(FVar(0))/16.0;16*(FVar(1)-.4375);2*sin(pi/50*time+50)
y = -cos(FVar(0)-pi)/2;.5*(FVar(0)-.4375)
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 7.2*(Time+36)
scale = FVar(1),FVar(1)
[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = ifElse((FVar(1)<=.40),-1,3)
[State 0, DestroySelf]
type = DestroySelf
trigger1 = !root, NumTarget
trigger2 = root, HitPauseTime > 0
;--------------
[StateDef 782]
ctrl = 0
anim = 1
[State 777, Safeguard]
type = NotHitBy
trigger1 = 1
value = SCA
[State 777, NoShadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[State 777, PlaySnd]
type = PlaySnd
trigger1 = !Time
trigger1 = Var(10) := root,Var(10)
value = S3050,ifElse(Var(10)<4,0,1) ; Play Capcom sound for Capcom grooves, and the SNK sound for SNK grooves
[State 0, DestroySelf]
type = DestroySelf
trigger1 = !root, NumTarget
trigger2 = root, HitPauseTime > 0

In -2:
Code:
;----------------------------------------------------------------------------------
; Dizzy FX
[State -2]
type = Helper
triggerall = NumTarget
trigger1 = !NumHelper(777)
trigger1 = RoundState = 2
trigger1 = target, StateNo = [5300,5350]
helperType = normal
name = "dizzy"
ID = 777
pos = (enemyNear(0),Const(size.head.pos.X)),(enemyNear(0),Const(size.head.pos.Y))
size.xscale = 1
size.yscale = 1
size.ground.front = 16+enemyNear(0), Const(Size.Ground.Front)
size.ground.back = 16+enemyNear(0), Const(Size.Ground.Front) ;This is intentional
postype = p2
facing = 1
stateno = 777
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
[State -2]
type = Helper
triggerall = NumTarget
trigger1 = !NumHelper(782)
trigger1 = RoundState = 2
trigger1 = target, Anim = 5300
helperType = normal
name = "dizzy sound"
ID = 782
pos = 0,0
postype = p2
facing = 1
stateno = 782
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

5300 is the dizzy state itself. It can be as simple as:
Code:
;---------------------------------------------------------------------------
; Dizzy
[Statedef 5300]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
anim = 5300

[State 5000, 7]
type = SelfState
trigger1 = Time > 96 ; Base time of 2 seconds in speed 3. (120 * 4/5)
value = 0
ctrl = 1

... or you can add mashy code to make it more fair.
Title: Re: how to create dizzy stars effect
Post by: Sheng Long on March 12, 2015, 01:05:35 am
I don't know what the video was about, but you can rotate explods via animation.air positions, if you know exactly where to set the X Y off sets of the star/birds for each tick of frame. ;)
Title: Re: how to create dizzy stars effect
Post by: Jesuszilla on March 12, 2015, 01:07:31 am
Only in 1.1
Title: Re: how to create dizzy stars effect
Post by: altoiddealer on July 25, 2015, 07:07:08 pm
Sorry to bump this, but I'm trying to implement your dizzy effect with my character and it's simply not working.

The stars simply don't appear when my character is put into State 5300.


I tried changing all the vars to numbers I'm not using already, too
Title: Re: how to create dizzy stars effect
Post by: Jesuszilla on August 15, 2015, 04:57:50 pm
@altoiddealer: They're helper vars; you can keep them as-is and see if the problem persists.
Title: Re: how to create dizzy stars effect
Post by: emcevo on September 20, 2015, 10:09:20 am
bump:
got problem too.. I have the dizzy animation of the character but the starts or ducks animation on his head doesn't seem to display.. :(
Title: Re: how to create dizzy stars effect
Post by: altoiddealer on September 20, 2015, 07:33:51 pm
@altoiddealer: They're helper vars; you can keep them as-is and see if the problem persists.

I haven't tried messing around with it again, but I just want to state that I first followed the directions carefully, THEN started screwing around with it when it wasn't working
Title: Re: how to create dizzy stars effect
Post by: emcevo on September 21, 2015, 04:49:36 am
@altoiddealer: They're helper vars; you can keep them as-is and see if the problem persists.

I haven't tried messing around with it again, but I just want to state that I first followed the directions carefully, THEN started screwing around with it when it wasn't working

Can you send me of the code for it? where to put on what state? ty
Title: Re: how to create dizzy stars effect
Post by: altoiddealer on September 21, 2015, 01:46:29 pm
I gave up on it and may try again sometime

It didn't work for me either is what I'm saying :)
Title: Re: how to create dizzy stars effect
Post by: Jesuszilla on September 26, 2015, 06:02:45 pm
Wait a second, did you make sure to modify the triggers so that it's when your character is in State 5300, not the target?
Title: Re: how to create dizzy stars effect
Post by: emcevo on September 29, 2015, 02:03:15 am
Wait a second, did you make sure to modify the triggers so that it's when your character is in State 5300, not the target?

Hi sir. Can you please help us with it. Can you post the complete code of dizzy effect?
Title: Re: how to create dizzy stars effect
Post by: AlexSin on September 29, 2015, 02:09:52 am
You can make a new topic asking how to code the dizzy state/s.

or just read here: http://mugenguild.com/forum/msg.2088332
(in this topic)
Title: Re: how to create dizzy stars effect
Post by: Jesuszilla on October 14, 2015, 03:06:16 am
Wait a second, did you make sure to modify the triggers so that it's when your character is in State 5300, not the target?

Hi sir. Can you please help us with it. Can you post the complete code of dizzy effect?

That is the complete code. If you want it to happen when your character is in the dizzy state, remove the "target," redirection and have the state go to your dizzy state (which I'd recommend keeping at 5300 for compatibility reasons). You'll also need to modify the DestroySelf.