News:

MFG's Character of the Month: September 2026 Voting

Main Menu

Intro Making Help

Started by The Lord of the Flies, September 01, 2007, 10:49:29 PM

Previous topic - Next topic

The Lord of the Flies

Ok, I'll explain these intro.

I have God Rugal and Violent Ken, and I want to make a special intro for them. I want them to start on the opposite site of their initial start point (say Rugal is player 1, so he should start at the right of the screen). They are off-screen first. Then both characters rush to the center of the stage (meaning like they collide). When they touch each other, what happens is that screen turns dark and an orochi skull explodes. After, like for a second, screen returns to normal with both characters now in their respective start point. The fight then begins.

Now, I got a rough mental sketch on how to do this. First, with a "posset" move Rugal and Ken to their off-screen-opposite-side position. Move them to the center with VelSet (and maybe VelMudd to deaccelerate them). When they collide, EnvColour, Explods, etc.

Now, these two are my doubts:
1- How can I measure when Rugal and Ken are close enough? Something like "p2xdistance" or something like that? I'd like
    them to collide at the exact center. This, to begin all the fx stage of the intro.
2- Similiar to above. How can I put them exactly at their starting point without screwing it up? This happening after the fx phase.

As you see, this intro is quite similiar to the Gouki vs Evil Ryu intro. Some differences is that when they touch each other, they don't "stop and grab their foe" (like G vs ER). I want them to just "pass by" the opponent. And in that passing time, make all the screen turn to black, etc. When screen turns back to normal, I'd like to make both opponents ready, in their start points, for the battle.

If something didn't get clear enough, plz tell me, so I can better explain myself.

Sig made by TempesT :)

Loona

While I haven't messed with this type of coding, I hear some people make their actual character sprites invisible during intros that involve moving, and get Explods to move around the screen for them.
As for the distance thing, perhaps you just have to consider how close they are to the center of the stage?...

The Lord of the Flies

#2
Very well, I started coding the intro. Everything is going out well, but I found a problem. Maybe It's simple but I have overlooked it. Let me put the code I got so far:

; Intro vs God Rugal
[Statedef 193]
type = S
movetype = I
physics = N
ctrl = 0
anim = 192
velset = 0,0
sprpriority = 2

[State 191, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 192, Helper]  -----This and the sctrl below were burrowed from PotS' chars.
type = Helper               This makes the camara stay in a fixed position (I think).
trigger1 = !NumHelper(8030)
helpertype=normal
StateNo = 8030
ID = 8030
name = "Camera"
postype = p1

[State 192, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,1

[State 191, PosSet]
type = PosSet
trigger1 = !Time
x = -250*Facing

[State 191, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S100,2
volume = 255

[State 191, VelSet]
type = VelSet
trigger1 = !Time
x = 6
y = 0

[State 191, VelSet]
type = VelSet
trigger1 = P2BodyDist X <= 20
x = 0

[State 191, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 192 && P2BodyDist X <= 20
value = 192
elem = 2

[State 191, PlaySnd]
type = PlaySnd
trigger1 = !AnimElemTime(2)
value = S10,14
volume = 255
channel = 0
persistent = 0

;==============================
; INSERT OMG FX HERE
;==============================

[State 191, ChangeAnim]       ;ME WANNA TRIGGER THIS DAMN SCTL!
type = ChangeAnim
trigger1 = AnimElemTime(2)>=50 && AnimElemTime(3)<0
value = 192
elem = 3

[State 191, VelSet]
type = VelSet
trigger1 = !AnimElemTime(3)
x = -2
y = 0

[State 191, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

The piece of code noted is the one that isn't working for now. Any tips on it and in the overall coding, so far? Surely it's something about the triggering. And yes, the animation is well made with the right anim numbers and such :P.

Sig made by TempesT :)

ZzEzZ

1)u can use p2bodydist x 2 c when they are close 2 eachother...
either a velset and a veladd 2 make them run 2 center, or physics = s and a kinda big velset

2) u can store their starting point in a var at the beginning of the intro (b4 u put them offscreen) then jus use a posset 2 put them back after ur screen fade

The Lord of the Flies

Ok, I got almost everything set up. I only have one issue.

After having both characters speeding to the center of the screen, grabbing each other, doing omg fx, and all that, my characters leap back to their starting positions. The question is, how can I make sure they land on the CORRECT start position? Right now I they land farther from each other than what they're supposed. So when the "FIGHT" msg appears, my characters are restored to the original start points.

So, is there a formula to make them land/stop on the right spot that I'm missing?

Code:

;---------------------------------------------------------------------------
;Intro vs Violent Ken
[Statedef 194]
type = S
movetype = I
physics = N
ctrl = 0
anim = 196
velset = 0,0
sprpriority = 1

[State 194, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 194, Helper]
type = Helper
trigger1 = !NumHelper(8030)
helpertype=normal
StateNo = 8030
ID = 8030
name = "Camara"
postype = p1

[State 194, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,1

[State 194, PosSet]
type = PosSet
trigger1 = !Time
x = -250*Facing

[State 194, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S5,13
volume = 255

[State 191, VelSet]
type = VelSet
trigger1 = !Time
x = 6
y = 0

[State 194, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 196 && AnimElemTime(2)<0 && P2Dist X <= 72
value = 196
elem = 2

[State 194, VelSet]
type = VelSet
trigger1 = AnimElemTime(2)>=0 && AnimElemTime(3)<0
x = 0

[State 194, PlaySnd]
type = PlaySnd
trigger1 = !AnimElemTime(2)
value = S10,11
volume = 255
channel = 0
persistent = 0

[State 194, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 196 && AnimElemTime(2)>=100 && AnimElemTime(3)<=0
value = 196
elem = 3

[State 194, PlaySnd]
type = PlaySnd
trigger1 = !AnimElemTime(3)
value = S20,3+(random%4)
volume = 255
channel = 0
persistent = 0

[State 194, VelSet]
type = VelSet
trigger1 = !AnimElemTime(3)
x = -2

[State 194, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

Sig made by TempesT :)

PotS

[State vel]
type = velset
trigger1 =
x = (helper(8030),rootdist x)/-40.0

Replace 40 with the time the char should take to get back to his starting position. Or just use a posset instead if you want it instant, of course.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.

ZzEzZ

i thought he was moving his chars? not the helper? o.0

itd be the same as wat pots said, but instead of    helper,rootdist...    itd b the var u stored their original start pos's in (if u did that)

The Lord of the Flies

Quote from: P.o.t.S. on September 16, 2007, 02:44:32 AM
[State vel]
type = velset
trigger1 =
x = (helper(8030),rootdist x)/-40.0

Replace 40 with the time the char should take to get back to his starting position. Or just use a posset instead if you want it instant, of course.
Ooooh, now I see what's the purpose of those helpers. To keep record of the start position and (I THINK) to get a fixed camera.

Very well, I'll do this tomorrow. If I get in moar trouble, I'll post again.

Sig made by TempesT :)

PotS

Quote from: L.o.t.F. on September 17, 2007, 04:46:45 AM
Ooooh, now I see what's the purpose of those helpers. To keep record of the start position and (I THINK) to get a fixed camera.
:yeses:
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.