Random Intros

Started by tetsuo9999, September 18, 2007, 05:58:08 AM

Previous topic - Next topic

tetsuo9999

Anyway to make intros random?
WOO! WOO! WOO!
PSN / XBLA - ViewtifulSuxx

DemonicDrPhil

random modulus the number of intros made with if else to the changstates?

i think there is code for this somewhere.
Latest Yoshi alpha ready for feedback Aug 15th check here for details...

tetsuo9999

Quote from: DemonicDrPhil on September 18, 2007, 06:04:23 AM
random modulus the number of intros made with if else to the changstates?

i think there is code for this somewhere.
Do you know a trigger that makes them random?
WOO! WOO! WOO!
PSN / XBLA - ViewtifulSuxx

DemonicDrPhil

#3
dont you just use the word random? like in programming languages...where's  [E] and cyanide when you need them...did you check the code snippet archive?


[State 9000: ChangeAnim]
type = ChangeAnim
trigger1 = (Time = 0) && (HitCount = 0) && (Random <= 999 / 6)
value = * ;Weak Punch

^see random
I'm pretty sure % is modulus so Random % 4 will give you the values 0,1,2,3,4 then you have if (variable=0) then intro 1 etc..

I'll modify or post if I find the code.
*EDIT*
found it by searching the forum credit to ZzEzZ

Quote from: ZzEzZ on September 10, 2007, 03:35:44 AM
diff, intro/win/lossis just a random changestate... like this
;intro
[stat...]
type = changestate
trigger1 = !time
value = iflese((random<333),200,ifelse((random=[333,665]),201,202))
that is more or less what a person might do if they have 3 intros or w/e which they would want to play randomly
Latest Yoshi alpha ready for feedback Aug 15th check here for details...

tetsuo9999

Quote from: DemonicDrPhil on September 18, 2007, 06:07:22 AM
dont you just use the word random? like in programming languages...where's  [E] and cyanide when you need them...did you check the code snippet archive?


[State 9000: ChangeAnim]
type = ChangeAnim
trigger1 = (Time = 0) && (HitCount = 0) && (Random <= 999 / 6)
value = * ;Weak Punch

^see random
I'm pretty sure % is modulus so Random % 4 will give you the values 0,1,2,3,4 then you have if (variable=0) then intro 1 etc..

I'll modify or post if I find the code.
*EDIT*
found it by searching the forum credit to ZzEzZ

Quote from: ZzEzZ on September 10, 2007, 03:35:44 AM
diff, intro/win/lossis just a random changestate... like this
;intro
[stat...]
type = changestate
trigger1 = !time
value = iflese((random<333),200,ifelse((random=[333,665]),201,202))
that is more or less what a person might do if they have 3 intros or w/e which they would want to play randomly
I still don't get it...do you need vars?..
WOO! WOO! WOO!
PSN / XBLA - ViewtifulSuxx

DemonicDrPhil

found that in the code archive deal it didnt say anything else
Latest Yoshi alpha ready for feedback Aug 15th check here for details...

Cybaster

Use a changestate with random%N as value

random%N will give you the rest of the euclidian division of random by N, so it will give you a random number between 0 and N-1

For example, put your three intros in state 200,201 and 202, and in your changestate, use value = 200+random%3.

Anjel

or use IfElse

IfElse(random < 500,190,191) ;IfElse(trigger or Condition,If,Else) So 190 Intro 1, 191 intro 2, then you can use IfElse in your IfElse.
My shitty mugen stuff: