News:

MFG's Character of the Month: September 2026 Voting

Main Menu

intro selection not working.

Started by Momotaro, April 15, 2022, 11:48:38 AM

Previous topic - Next topic

Momotaro

I'm back working on Ryu's Shimo (My custom)
She had just one intro 191
I tried adding one more 192 (based on DW's Psylocke jump in intro) - but the problem is not here.

State 190 is a selector, but it always end using 1st intro (it choose 191 and never 192)

Is there something wrong in the code ? Any help is welcome.

Code:
Spoiler (click to show)
;---------------------------------------------------------------------------
; ??????
; CNS ???: ??
;
; ??????(var)???????????????????
; VarRandom?range???????????????????
; ?????????????

;??????
[Statedef 190]
type = S
ctrl = 0
anim = 0
velset = 0,0

[State 5900, Intro Decider]
type = ChangeState
trigger1 = RoundNo = 1
value = 190 + (random%2);3)

;[State 180,]
;type = ChangeState
;trigger1 = time = 1
;value = 192;1

[State 5900, End]
type = ChangeState
trigger1 = 1
value = 0

;---------------------------------------------------------------------------
; ????(????????????)
; CNS ???: ??

[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0

[State 191, ????] ;?ROUND1, FIGHT!???????????????????????????????
type = AssertSpecial
trigger1 = 1
flag = Intro ;????????????

[State 191, ????]
type = AssertSpecial
trigger1 = numexplod(8000) = 1
flag = nobardisplay

[State 191, ??????]
type = ChangeAnim
triggerall = RoundsExisted = 0
triggerall = TeamMode = Turns
triggerall = roundno > 1
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
trigger1 = Time = 30
value = 191
Elem = 2

[State 191, ?????]
type = PlaySnd
trigger1 = AnimElem = 2
value = s10,58

[State 191, ?????]
type = PlaySnd
trigger1 = AnimElem = 5
value = s0,8

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


;-----------------------
;Intro 2 - jump in screen
[Statedef 192]
type = A
anim = 192
velset = 0, 0
ctrl = 0

[State 192, IntroAssert]
type = assertspecial
trigger1 = 1
flag = intro

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

[State 192, Camera Helper]
type = helper
trigger1 = !numhelper(8999)
helpertype = normal
stateno = 8999
ID = 8999
name = "Camera"
postype = p1

[State 192, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,1
channel = 0
persistent = 0

[State 192, Pos]
type = posset
trigger1 = !time
x = (-320 + abs(pos x)) * facing

[State 192, Velocity]
type = velset
trigger1 = !time
x = (helper(8999), rootdist x) / -38.0
y = -10.25

[State 192, Gravity]
type = veladd
trigger1 = 1
y = 0.52

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

;---Land---
[Statedef 10192]
type = S
physics = S
anim = 10192
velset = 0, 0

[State 10192, Intro]
type = assertspecial
trigger1 = 1
flag = intro

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

[State 10192, Landing Snd]
type = Playsnd
trigger1 = !Time
value = 52,0

[State 10192, Landing Dust]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = p1
scale = .5,.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

;[State 10192, Voice]
;type = PlaySnd
;trigger1 = AnimElem = 9
;value = 195, 0
;channel = 0

[State 10192, End]
type = ChangeState
trigger1 = !Animtime
value = 0

VictorCYBR

Since 190 is de decider, you should use it like this:

[State 5900, Intro Decider]
type = ChangeState
trigger1 = RoundNo = 1
value = 191 + (random%2)

Momotaro

Quote from: DeathScythe on April 15, 2022, 01:00:00 PM
Since 190 is de decider, you should use it like this:

[State 5900, Intro Decider]
type = ChangeState
trigger1 = RoundNo = 1
value = 191 + (random%2)

Wow ! I feel stupid ^^;
Even if I used it before
Thanks for your help.

I'll make some tests.