Adding an intro to a Char

Started by Tiger-Boy, April 06, 2022, 11:39:23 PM

Previous topic - Next topic

Tiger-Boy

Hello;

I am trying to add an intro to one of my chars. I already have the animations, and the coding. However, the system is not recognizing the instruction.

I believe the issue is in this coding:
Spoiler (click to show)
[State 5901, Turns Intro]
type=changestate
trigger1= teammode=turns
trigger1= !roundsexisted && roundno>=2
value=6900

[State 5901, Intro]
type=changestate
trigger1= roundno=1
value= ifelse(random<333, 6905, ifelse(random<500, 191, 190));Intros
[State 5901, End]
type=changestate
trigger1= 1
value=0

I believe this to be so, because the 3 intros that the char has have the following numbers ( Statedef ):
190
191
6905 (This one has several instructions in it: 6905, 6906, 6907 and 6908.

I have tried to edit the value in the command, but all I managed is to mess up the intros. And the new one still is not showing.

Any help will be greatly appreciated.  :neutral:
"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE

VictorCYBR

So, I believe 6905 is the new intro you're trying to implement, and that state is like a redirect to 6906, 6907, and 6908. Is that correct?
Another question: are the other intros (190 and 191) working as intended?

In this case what I would do:
- Check if state 5900 is changing to 5901 correctly (it should, if the other intros are working).
- Try using just the state number instead of ifelses and randoms, even use another state like a punch or kick to see if it's working, if they do, then the problem is not here.
- Check states 6905 ~ 6908, see if they are not being used, and check their code to see if nothing weird is happening there, like changing to the stand too early.

If none of this works, I'd ask you to post the code for states 6905 ~ 6908 here.
The code you just posted is fine, my guess is that as soon as it changes to state 6905, something weird is going on.

Also, state 190, in a lot of cases, are just redirects to other intros too. Usually it goes:
5900 (always the first thing to load) -> 190 (intro decider) -> one of the intro states, usually 191, 192, 193...
So I would check it too, just in case.

Tiger-Boy

#2
Hello @DeathScythe, and thank you for responding;

The 6905 is an intro code that was already in the char (this is the Cammy I am working on. This intro is the one where she comes from the top, lands on the corner of the 'window' and then lands on the floor).

The 190 and 191 intros work fine (one is Cammy's 'cutthroat' gesture, and the other is the one with her coat).

Here are the coding for the intros:
Spoiler (click to show)
;*************************

;====================<INITIALIZE>====================
[Statedef 5901]
type=S

[state 5900, Palette]
type = RemapPal
trigger1 = 1
source = 1, 1
dest = 1, PalNo

((Here are some special intros with specific characters, all with state 5901. I will add one just as an example))

[State 5901, Intro VS Vega];Dictator
type=changestate
triggerall= numenemy
triggerall= !roundsexisted || !(enemy,roundsexisted)
triggerall= !(teammode=simul) && !(enemy,teammode=simul)
trigger1= enemy,name="Vega" && enemy,authorname="Phantom.of.the.Server"
trigger2= enemy,name="Bison" && enemy,authorname="Phantom.of.the.Server"
value=171

[State 5901, Turns Intro]
type=changestate
trigger1= teammode=turns
trigger1= !roundsexisted && roundno>=2
value=6900

[State 5901, Intro]
type=changestate
trigger1= roundno=1
value= ifelse(random<333, 6905, ifelse(random<500, 191, 190))
[State 5901, End]
type=changestate
trigger1= 1
value=0

;====================<INTRO 1>====================
[Statedef 190]
type=S
physics=S
anim=190
[State 190, Intro]
type=assertspecial
trigger1= 1
flag=intro

[State 190, Snd]
type=playsnd
trigger1= animelem=7
value=6,0
channel=0

[State 190, Snd]
type=playsnd
trigger1= animelem=6
value=7,1
[State 190, Coat]
type=helper
trigger1= animelem=6
helpertype=normal
stateno=6000
ID=6000
name="Coat"
postype=p1
ownpal=1

[State 190, End]
type=changestate
trigger1= !animtime
value=0


;====================<INTRO 2>====================
[Statedef 191]
type=S
physics=S
anim=191
[State 191, Intro]
type=assertspecial
trigger1= 1
flag=intro

[State 191, Snd]
type=playsnd
trigger1= animelem=5
value=6,0
channel=0
[State 191, Snd]
type=playsnd
trigger1= animelem=2
value=1,0
channel=1

[State 191, End]
type=changestate
trigger1= !animtime
value=0


;====================<TURNS INTRO>====================
[Statedef 6900]
type=A
anim=6900
velset=0,0
ctrl=0
[State 6900, Intro]
type=assertspecial
trigger1= 1
flag=intro

[State 6900, Camera]
type=screenbound
trigger1= 1
value=0
movecamera=0,0
[State 6900, Camera]
type=helper
trigger1= !numhelper(8999)
helpertype=normal
stateno=8999
ID=8999
name="Camera"
postype=p1

[State 6900, Pos]
type=posadd
trigger1= !time
x= floor(-2*backedgedist)

[State 6900, Vel]
type=velset
trigger1= !time
x= (helper(8999),rootdist x)/-40.0
y= -10.25
[State 6900, Vel]
type=veladd
trigger1= 1
y= .5

[State 6900, End]
type=changestate
trigger1= time
trigger1= pos y>-vel y
value=6901


;---Land---
[Statedef 6901]
type=S
physics=S
anim=6901
velset=0,0
[State 6901, Intro]
type=assertspecial
trigger1= 1
flag=intro

[State 6901, Pos]
type=posset
trigger1= !time && numhelper(8999)
x= ceil(helper(8999),pos x)

[State 6901, Snd]
type=playsnd
trigger1= !time
value=0,52; Land Sound
[State 6901, Dust]
type=explod
trigger1= !time
anim=8102
sprpriority=-3
postype=p1
scale=.5,.5
pausemovetime=-1
supermovetime=-1
ownpal=1

;[State 6901, Snd]
;type=playsnd
;trigger1= animelem=12;7
;value=6,3; "My Turn!"
;channel=0
[State 6901, Snd]
type=playsnd
trigger1= animelem=9;4
value=1,0; 'Fast' Sound
channel=1

[State 6901, End]
type=changestate
trigger1= !animtime
value=0


;====================<JUMP INTRO>====================
[Statedef 6905]
type=A
physics=N
movetype=I
anim=6905
velset=0,0
ctrl=0
[State 6905, Intro]
type=assertspecial
trigger1= 1
flag=intro

[State 6905, Camera]
type=screenbound
trigger1= 1
value=0
movecamera=0,0
[State 6905, Camera]
type=helper
trigger1= !numhelper(8999)
helpertype=normal
stateno=8999
ID=8999
name="Camera"
postype=p1

[State 6905, Pos]
type=posset
trigger1= !time
x= 160*facing
y= -208

[State 6905, Vel]
type=velset
trigger1= !time
x= facing * ((-140 * facing) - pos x)/32.0

[State 6905, Vel]
type=veladd
trigger1= 1
y= .25

[State 6905, End]
type=changestate
trigger1= facing=1 && pos x<=(-140 - vel x)
trigger2= facing=-1 && pos x>=(140 + vel x)
value=6906
[State 6905, End]
type=changestate
trigger1= time
trigger1= pos y>-vel y
value=6908


;---Wall---
[Statedef 6906]
type=A
physics=N
movetype=I
anim=6906
velset=0,0
ctrl=0

[State 6906, Intro]
type=assertspecial
trigger1= 1
flag=intro
[State 6906, Camera]
type=screenbound
trigger1= 1
value=0
movecamera=0,0

[State 6906, Vel]
type=posset
trigger1= 1
x= -160*facing
y= -100

[State 6906, Snd]
type=playsnd
trigger1= !time
value=0,103

[State 6906, Snd]
type=playsnd
trigger1= !time
value=6,2
channel=0

[State 6906, End]
type=changestate
trigger1= !animtime
value=6907


;---Fall---
[Statedef 6907]
type=A
physics=N
movetype=I
anim=6907
velset=0,0
ctrl=0

[State 6907, Intro]
type=assertspecial
trigger1= 1
flag=intro
[State 6907, Camera]
type=screenbound
trigger1= 1
value=0
movecamera=0,0

[State 6907, Pos]
type=posadd
trigger1= !time
x= ceil(32 * const(size.xscale))

[State 6907, Vel]
type=velset
trigger1= !time
x= (helper(8999),rootdist x)/-19.0
[State 6907, Vel]
type=veladd
trigger1= 1
y= .5

[State 6907, End]
type=changestate
trigger1= pos y>-vel y
value=6908


;---Land---
[Statedef 6908]
type=S
physics=S
movetype=I
anim=6908
velset=0,0
[State 6908, Intro]
type=assertspecial
trigger1= 1
flag=intro

[State 6908, Pos]
type=posset
trigger1= !time
y= 0
[State 6908, Pos]
type=posset
trigger1= !time && numhelper(8999)
x= ceil(helper(8999),pos x)

[State 6908, Snd]
type=playsnd
trigger1= !time
value=0,52
[State 6908, Dust]
type=explod
trigger1= !time
anim=8102
sprpriority=-3
postype=p1
scale=.5,.5
pausemovetime=-1
supermovetime=-1
ownpal=1

[State 6908, End]
type=changestate
trigger1= !animtime
value=0

;====================<INTRO vs M.Bison>====================
[Statedef 171]
type=S
physics=S
anim=171
[State 171, Intro]
type=assertspecial
trigger1= 1
flag=intro

[State 171, Snd]
type=playsnd
trigger1= animelem=5
value=0,106
channel=1

[State 171, End]
type=changestate
trigger1= !animtime
value=0

Should all intros follow the consecutive numbers of 191, 192, 193, etc...?
"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE

VictorCYBR

No, they don't need to follow any order or use specific numbers. Reading through the code, they should be fine, can't think of anything wrong here.

So, what exactly is happening? Intros 190 and 191 are working, but 6905 is not?
If you replace all the ifelses and randoms in that changestate (in 5901) by just 6905, what happens?

Tiger-Boy

#4
Al intros (190, 191 and 6905) are working fine. I just need to add a new one. This new one is not here ( I can add it later, if needed).

I already have it ready (sound and all). I just need to let the system know to add it to the random intros.

I edited the following code:

value= ifelse(random<333, 6905, ifelse(random<500, 191, 190))

I added the new number in some parts of this code:
value= ifelse(random<333, 6905, ifelse(random<500, 191, 190, ###)) => Will crash the game in the VS screen before the fight.

I don't remember what was the other thing I did on this code, but it messed up the intros. It added Guile's intro (salute) to the regular intros. And the new one did not appear.
"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE

VictorCYBR

Ahhhhhhh, well, why didn't you say that early!? lol

Yeah, ifelses only accept two options, so you need to insert another ifelse:

value= ifelse(random<250, 6905, ifelse(random<333, 191, ifelse(random<500, 190, ###)))

Tiger-Boy

OOoooh!  :o

Ok, the "ifelses only accept two options" is new to me. LEARNING!  ;D

Thank you! I will try it out, and see what happens.

:bjugoi:
"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE

VictorCYBR

Please tell me if it works, I can't live in peace without knowing if it worked or not! :fuuu:

Tiger-Boy

#8
Apologies for the (Very) late reply.

It worked.

Much appreciated.  :bjugoi:
"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE