how do you create a char intro? (not storyboard)

Started by bingo755, April 12, 2012, 01:30:13 PM

Previous topic - Next topic

bingo755

Title says all and this is my problem making a intro
; PREINTRO
[Statedef 190]
type = S
ctrl = 0
velset = 0,0
anim = 10


[State 190]
type = ChangeAnim
trigger1 = selfAnimExist(191)
value = 190


[State 190] ;Go straight to intro.
type = ChangeState
trigger1 = time = -20
value = 191
;---------------------------
; Introduction
[Statedef 191]
type = S
ctrl = 0
anim = 13
velset = 0,0
flag = intro
trigger1 = time = -10

[State 191] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 190
flag = intro

[State 191] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = intro
flag1 = nobardisplay


[State 191] ;Change to stand state when done
type = Changestate
trigger1 = AnimTime = 220
value = 0

yes im a noob and need help please. 8)

GT

#1
Quote from: bingo755 on April 12, 2012, 01:30:13 PM
[State 190] ;Go straight to intro.
type = ChangeState
trigger1 = time = -20
value = 191

Negative time is invalid. Change time = -20 to time = 20 and the intro will work.

bingo755


GT

Where did you get those first two statedefs from (assuming you didn't write them yourself)?

Make sure all the anims that you're asking for are present (From what I see 190 is the one being requested).

Don't use state 190 for the actual intro. Use it to redirect to other states that can be used as intros.

Quote from: bingo755 on April 12, 2012, 01:30:13 PM
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 190] ;Go straight to intro.
type = ChangeState
trigger1 = time = 0
value = 191

You didn't need that changeanim and anim = 10 in the first statedef so I remove them. Time = -20 will never happen so It's changed to time = 0 (Which activates as soon as possible).

Quote from: bingo755 on April 12, 2012, 01:30:13 PM
;---------------------------
; Introduction
[Statedef 191]
type = S
ctrl = 0
anim =  190
velset = 0,0
flag = intro
trigger1 = time = -10


[State 191] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 190
flag = intro

[State 191] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = intro
flag1 = nobardisplay

[State 191] ;Change to stand state when done
type = Changestate
trigger1 = !animtime
value = 0

Anim was 13 and I changed it to 190 because I don't believe that you actually have an anim 13.
Flag = Intro and trigger1 = time = -10 should be removed. There's no reason for them to be there.
http://elecbyte.com/wiki/index.php/AssertSpecial
http://elecbyte.com/wiki/index.php/Category:Triggers

I also don't believe you have an anim that lasts for 220 ticks (sure it's possible, but I don't believe that's the case here). I changed it to !animtime so the state would change when your character's animation is over.
http://elecbyte.com/wiki/index.php/AnimTime


bingo755

tried that and yet it still didn't work my char just stands there and the round instantly starts
heres my modifications according to what you said.
; PREINTRO
[Statedef 190]
type = S
ctrl = 0
velset = 0,0


[State 190]
type = ChangeAnim
trigger1 = selfAnimExist(190)
value = 190


[State 190] ;Go straight to intro.
type = ChangeState
trigger1 = time = 0
value = 191
;---------------------------
; Introduction
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 191] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 0


[State 191] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = intro
flag = nobardisplay


[State 191] ;Change to stand state when done
type = Changestate
trigger1 = !AnimTime
value = 0

GT

Are you sure anim 190 exists? Use ctrl+d to active the debug screen, monitor the text, and check if your character even enters state 191.

Why did you add a changeanim that changes your character's animation to 0?

bingo755

I checked and state 191 doesnt exist. I changed the animation so after the intro  my char goes  into standing animation afterwards.

GT

You don't need a changeanim for that. Once your character's animation is finished they'll go into state 0 and transition into their standing animation automatically.

How could state 191 not exist? You just posted it. You need to find out if animation 191 exists.

Cybaster

Several parts in the code don't make much sense.

- Why change to anim 190 in state 190 if at time=0 you're going to state 191.
- You tell state 191 to use anim 190, but then you change it to anim 0 during roundstate=0, meaning your char directly goes in stance animation, and when the stance is finished you chage to state 0.

Fixed code :

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

[State 190] ;Go straight to intro.
type = ChangeState
trigger1 = time = 0
value = 191
;---------------------------
; Introduction
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 191] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 191] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = intro
flag = nobardisplay

[State 191] ;Change to stand state when done
type = Changestate
trigger1 = !AnimTime
value = 0

bingo755

tried out your fixed code and yet it still didnt work! my char still stands and yes i have a image for 190 converted to.

GT


bingo755

#11
Yep.

GT


Cybaster

Yeah, just post your code for anim 190 and show us a fighter factory screenshot with the sprite you're talking about, with the correct group and image number.

Also, in game press Ctrl+D and tell us which states the chars goes through with which anims, and if any debug flood appears.

bingo755

#14
;***************************************************************************;
;******************* Created in Fighter Factory Ultimate *******************;
;*******************      http://www.virtualltek.com     *******************;
;***************************************************************************;
air file
; stand
[Begin Action 0]
1,0, 1,16, 10,

; small punch
[Begin Action 50]
Clsn1: 1
  Clsn1[0] = 6, -49, 30, -22
Loopstart
3,0, 5,13, 10,
Clsn1: 1
  Clsn1[0] = -10, -64, 48, -31
2,0, 8,14, 10,

; intro
[Begin Action 190]
13,0, 14,14, 10,
12,0, 8,12, 10,
11,0, 15,13, 10,
16,0, 7,24, 10,
11,0, 14,12, 50,
16,0, 6,15, 10,
20,0, 13,7, 20,
30,0, 2,13, 100,

; walk
[Begin Action 51]
51,0, -11,5, 10, H,

cns file
[Data]
life            = 9999
attack       = 99999
defence    = 9999
power      = 3000
fall.defence_up = 50
liedown.time    = 30
airjuggle    = 5
sparkno    = S9100
guard.sparkno    = S9130
KO.echo    = 0
volume       = 255
IntPersistIndex = 0
FloatPersistIndex = 40

[Size]
xscale       = 1.5
yscale       = 1.5
ground.back    = 22
ground.front    = 20
air.back       = 15
air.front       = 15
height       = 75
attack.dist    = 160
proj.attack.dist    = 90
proj.doscale    = 0
head.pos       = 4,-95
mid.pos       = 4,-60
shadowoffset    = 0
draw.offset    = 0,0

[Velocity]
walk.fwd        = 1.1
walk.back       = -0.8
run.fwd        = 8,0
run.back       = -10,0
jump.neu       = 0,-9
jump.back       = -3.0
jump.fwd       = 3.0
runjump.back    = -2.0,-8
runjump.fwd    = 4,-8
airjump.neu    = 0,-8
airjump.back    = -2.0.-8
airjump.fwd    = 2.0,-8

[Movement]
airjump.num    = 0
airjump.height    = 35
yaccel       = .45
stand.friction    = .85
crouch.friction    = .82


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



[State 192, 2]
type = ChangeState
trigger1 = AnimTime = -10
value = 0


  ; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 10 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4

[StateDef 200]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 50
poweradd = 20
sprpriority = 2

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 50
attr = S, NA
damage = 5000
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 200, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


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


[State 190]
type = ChangeAnim
trigger1 = selfAnimExist(190)
value = 190


[State 190] ;Go straight to intro.
type = ChangeState
trigger1 = time = 0
value = 191
;---------------------------
; Introduction
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 191] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 0


[State 191] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = intro
flag = nobardisplay


[State 191] ;Change to stand state when done
type = Changestate
trigger1 = !AnimTime
value = 0

right now its pretty basic what I have. The punch  (state 200) works which means the standing animation isnt looping the char goes state 5900 from preintro  until I do something for some reason even though i dont have it in my cns
and I dont know how to upload my tiles so i had to show them this way.

GT

You have two statedefs that share the same number. Why?

Quote from: bingo755 on April 12, 2012, 05:43:42 PM
[Statedef 190]
type = S
ctrl = 0
anim = 13
velset = 0,0,0

[State 192, 2]
type = ChangeState
trigger1 = AnimTime = -10
value = 0

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


[State 190]
type = ChangeAnim
trigger1 = selfAnimExist(190)
value = 190

[State 190] ;Go straight to intro.
type = ChangeState
trigger1 = time = 0
value = 191

Remove the first one.

Archive your files into .zip or .rar format and use Sendspace or Mediafire to upload them.

bingo755

#16
http://www.mediafire.com/download.php?zzu0tnto59v2ti5
thats my air file, my aggressor broly. credit goes to hidden anbu from photbucket for createing the image.

GT

Remove the first statedef 190 and the intro should work. 


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

[State 190] ;Go straight to intro.
type = ChangeState
trigger1 = time = 0
value = 191

THIS is the only statedef 190 that you should have.



bingo755

I already removed the first state 190 and yet it still seizes to work getting a little desperate.

GT

Upload your entire char and send it to me in PM. I'll make sure this is fixed. I understand if you'd rather not, but from what I see, I honestly can't think of anything that would fix your issue.