News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Coding a intro between 2 characters

Started by Ryon, June 26, 2009, 02:19:04 AM

Previous topic - Next topic

Ryon

so i've made 2 characters, and i want to make a intro for both of them.

this is the code i have in Holy Ryu

Quote;---------------------------------------------------------------------------
[Statedef 190]
type = S

[State 190, 1]
type = VarRandom                     
trigger1 = Time = 0                 
v = 3                               
range = 1,3                     

[State 190, 2]
type = ChangeState
trigger1 = var(3) = 1               
value = 191                   

[State 190, 2]
type = ChangeState
trigger1 = var(3) = 2   
value = 192

[State 190, 2]
type = ChangeState
trigger1 = enemy,name="Raging Ken" && enemy,authorname="Ryon"
trigger1 = var(3) = 3   
value = 193

and this is in Raging Ken's file.

Quote;---------------------------------------------------------------------------
[Statedef 190]
type = S

[State 190, 1]
type = VarRandom                     
trigger1 = Time = 0                 
v = 3                               
range = 1,4                     

[State 190, 2]
type = ChangeState
trigger1 = var(3) = 1               
value = 192                         

[State 190, 2]
type = ChangeState
trigger1 = var(3) = 2   
value = 193

[State 190, 2]
type = ChangeState
trigger1 = var(3) = 3         
value = 191 

[State 190, 2]
type = ChangeState
trigger1 = enemy,name="Holy Ryu" && enemy,authorname="Ryon"
trigger1 = var(3) = 4         
value = 194

it doesnt work... both characters just appear on screen in there "stand" animation.

what is the correct wait to code multiply intros, and have special intros agiants certain characters?
PLEASE HELP!

Byakko

trigger1 = enemy,name="Holy Ryu" && enemy,authorname="Ryon"
trigger1 = var(3) = 4

Why exactly did you decide to put this for triggers ? When do you expect that changestate to trigger ?
Also I hope you at least did make a statedef 191, 192 etc. and their corresponding anims.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Ryon

i mainly copied and pasted that from POTS' characters and pasted it to see if it would work.

but then after seeing it doesnt and having a flash back of my months of attempting this 1 year ago. i decided to ask for help.
since its obviously my stupidity that has taken over for that "coding", could someone show me the correct way to code several intros and specific VS. intros?

Byakko

statedef 190

type = changestate
trigger1 = enemynear,name="ken"
value = special intro
; only this as a trigger, and the first changestate. If the enemy is Ken, no matter what, you want to go to that state, so you can't allow going anywhere else bfore you're sure it's not ken. If you put another changestate triggered by random before that, if ryu goes to that other state, he'll never read your changestate for Ken's special intro.

type = changestate
trigger1 = random < 333
value = 192
; only if you're not facing Ken (if you are, you're already not in this stat anymore)
; 1/3 chance

type = changestate
trigger1 = random < 500
value = 193
; if you didn't go to 192, then you're already in the 2/3 chance of NOT going to 192. Now 1/2 chance out of these 2/3, that's 1/3 chance total of going to 193.

type = changestate
trigger1 = 1
value = 194
; 1/3 chance of going to 192, 1/3 of going to 193, what's left is the last 1/3, going to 194.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Ryon

so... simple like that?

wow.. ok so variables for the intro is obviously not the way to go. -_-...

thanks byakko.

also what does " enemynear" do? i thought it was enemy.name =

BC

Searches for the nearest opponent with the name Ken
Accepting commissions

Byakko

If you have a look at docs/trigger.html, you'll find that both exist and work pretty much the same. The difference is in 2vs2 mode - enemynear is more specific, taking the... nearest enemy, instead of the elusive "enemy". Anyway using one or the other is just a matter of habit.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Noctis

#7
I couldn't tell if this was figured out or not, but this is really simple.

[State 190, 4] ;Change to Kratos Introduction
type = ChangeState
triggerall = P2Name = "Kratos" || P4Name = "Kratos"
trigger1 = Time = 0
value = 191

[State 190, 5] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0


That's my intro and it works perfectly fine.

[State 190, 4] ;Change to Holy Ryu Introduction
type = ChangeState
triggerall = P2Name = "Holy Ryu" || P4Name = "Holy Ryu"
trigger1 = Time = 0
value = 194

[State 190, 4] ;Change to Raging Ryu Introduction
type = ChangeState
triggerall = P2Name = "Raging Ryu" || P4Name = "Raging Ryu"
trigger1 = Time = 0
value = 193

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."