YesNoOk
avatar

Problem with a special intro (Read 237 times)

Started by Trinitronity, June 12, 2013, 10:34:21 pm
Share this topic:
Problem with a special intro
#1  June 12, 2013, 10:34:21 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
There are some hijinx with one of Marisa's special intros:
Code:
;VS Mima_RP
[Statedef 19002]
Type = S
MoveType= A
Physics = S
Anim = 19002
Ctrl = 0
Sprpriority = 2

[State 19002, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay

[State 19002, PS]
type = PosSet
trigger1 = 1
x = (enemynear, pos x)+80

[State 210, PSND]
type = playsnd
trigger1 = animelem = 5;time = 0
value = 220,0
channel = 0

[State 220, 1]
type = PlaySnd
trigger1 = animelem = 6
value = 0, 1

[State 220, 1]
type = PlaySnd
trigger1 = animelem = 7
value = s2, 0

[State 19002, Explod]
type = Explod
trigger1 = anim = 19002
trigger1 = animelem = 7
anim = 190023
ID = 19002
pos = -63,-91
postype = p1
bindtime = 1
removetime = 30
ownpal = 1
sprpriority = 5

[State 19002, CS]
type = changestate
trigger1 = anim = 19002
trigger1 = animtime = 0
value = 190021

[Statedef 190021]
Type = S
Physics = S
Anim = 190021
Ctrl = 0
Sprpriority = 2

[State 19002, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay

[State 105, 1]
type = VelSet
trigger1 = 1;Time >= 2
x = -2.29*const(velocity.run.fwd.x)

[State 105, 1]
type = VelSet
trigger1 = Time >= 2
trigger1 = statetype != A
x = -2.29*const(velocity.run.fwd.x)
y = 0

[State 700, Explod]
type = Explod
trigger1 = Time = 2
ID = 700
anim = 701
pos = -50,-50
removetime = 11
sprpriority = 1
facing = 1

[State 700, Effect]
type = helper
trigger1 = time = 2
helpertype = normal
name = "Dash_FX"
ID = 700
pos = -15,-50
postype = p1
stateno = 700
ownpal = 1
facing = 1

[State 100, Snd]
type = PlaySnd
trigger1 = Time = 2
value = 100,0

[State 190021, CS]
type = ChangeState
trigger1 = time > 2
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 10
trigger2 = time > 30
trigger2 = (statetype = S) || (statetype = C)
trigger3 = time > 12
trigger3 = (statetype = S) || (statetype = C)
value = 190022

[Statedef 190022]
type    = S
physics = S
ctrl = 0
anim = 190022

[State 19002, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay

[State 101, PS]
type = posset
trigger1 = time = 0
y = 0

[State 106, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 106, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 106, 3]
type = MakeDust
trigger1 = Time = 2
pos = -5,-2
spacing = 1

[State 19002, end]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
It looks correct, if Marisa is Player 1 and Mima is Player 2.
But if vice-versa, Marisa appears behing Mima instead of in front.
because of that, she also stops at the wrong position. How to fix that? Thanks in advance!
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: Problem with a special intro
#2  June 13, 2013, 06:31:01 am
  • ***
    • USA
Not 100% sure but it looks like

[State 19002, PS]
type = PosSet
trigger1 = 1
x = (enemynear, pos x)+80

Might be causing the problem(s). I think you should use PosAdd instead of set. I believe Set uses the center of the screen and not the player.
           
Re: Problem with a special intro
#3  June 13, 2013, 05:07:56 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Not 100% sure but it looks like

[State 19002, PS]
type = PosSet
trigger1 = 1
x = (enemynear, pos x)+80

Might be causing the problem(s). I think you should use PosAdd instead of set. I believe Set uses the center of the screen and not the player.
Are you sure? I think it has something to do with the part I have bolded.
Afterall, Marisa DOES get position to the position of the opponent + 80.
How can I make it like that, so the +80 gets replaced with -80, whenever Marisa is Player 2.
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: Problem with a special intro
#4  June 14, 2013, 07:40:26 pm
  • *****
  • Mega Klinklang confirmed
    • USA
    • ricepigeon.webs.com
Not 100% sure but it looks like

[State 19002, PS]
type = PosSet
trigger1 = 1
x = (enemynear, pos x)+80

Might be causing the problem(s). I think you should use PosAdd instead of set. I believe Set uses the center of the screen and not the player.
Are you sure? I think it has something to do with the part I have bolded.
Afterall, Marisa DOES get position to the position of the opponent + 80.
How can I make it like that, so the +80 gets replaced with -80, whenever Marisa is Player 2.

Teamside. Or facing, depending on what you're trying to do. Since its an intro, either one can work.

Iirc, Posset is relative to the stage itself. +80 will always shift the character towards the right side of the screen regardless of which way the player is facing. Using an ifelse/cond statement with teamside/facing as the argument to check will return +80 or -80, respectively.

<<-- Updated 09/14/14

You limit yourself so badly when you try to avoid variables. When you get over your fear of the "complexity" of variables, you will find yourself in a better place: A beautiful world where coding is actually fun.
Re: Problem with a special intro
#5  June 14, 2013, 11:09:39 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
It worked, thanks!
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns