Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Multiple Win/Intros  (Read 1109 times)

Offline .:O:.

  • OpenBOR & Mugen addicted
  • M.U.G.E.N Contributor
  • ****
  • Posts: 1908
  • Country: br
  • Loved and hated by the community since 1999 :)
  • Referrals: 0
    • BMT - Brazil Mugen Team
Multiple Win/Intros
« on: April 28, 2009, 06:39:03 PM »
I know that many people already knows this, but this could helps the new creators (and why not the old ones too?) to have multiple win or intro poses

for Exemple, the win poses

Quote
Type = ChangeState
trigger1 = !Time
Value = 180+random%4

As you can see, with this small code you can make your char goes to any state from 180 to 184. Because when the random%4 value is, for example, 2, the result of 180+(2) is equal to 182.

The same could be aplied to the intro poses...just put this code on the state 190 and change the value to 190+random%4.

A small trick

If you wann more than 4 intro poses, you have to do this trick. On mugen, you can choose the states from 191-194 to intro, because the state 195 is for taunt.

So, the trick is to make states of higher numbers. On Spec Ops, we use the formula 190+(random%4* 100) (this mean 190 plus a random number from 0 to 4 then muplied by 100), so the intro states will be 19000,19001,19002 and so on.

You just need to change this part of code:

Quote
Type = ChangeState
trigger1 = !Time
Value = 180+(random%4*100)

The same goes to the intro states

« Last Edit: April 29, 2009, 09:45:55 AM by O Ilusionista »

Offline v

  • ******
  • Posts: 7583
  • Country: us
  • Referrals: 0
Re: Multiple Win/Intros
« Reply #1 on: April 28, 2009, 09:22:09 PM »
Thank you for sharing :)

Offline Fallen_Angel

  • **
  • Posts: 97
  • Referrals: 0
Re: Multiple Win/Intros
« Reply #2 on: April 28, 2009, 10:51:27 PM »
@OIlu....mate you dont need a variable to do that...just simple add......190 +random%4   ; means from 190 to 194

and for your trick.....you can use ifelse(random%500,190+random%4,1900+random%4)

every intro has the same possibility...remember random selects a number from 0 to 999

Offline .:O:.

  • OpenBOR & Mugen addicted
  • M.U.G.E.N Contributor
  • ****
  • Posts: 1908
  • Country: br
  • Loved and hated by the community since 1999 :)
  • Referrals: 0
    • BMT - Brazil Mugen Team
Re: Multiple Win/Intros
« Reply #3 on: April 29, 2009, 09:39:20 AM »
Jesus, again I haven't updated it without the var method??? gosh, it was my fault.

So this is the old one, I've changed it many time ago. thanx for poiting me the error.

edit: its fixed now, thanx.

about your tip:
Quote
you can use ifelse(random%500,190+random%4,1900+random%4)

That is valid, but is slower than simply putting 190+(random%4*100). Because Mugen needs to evaluate the both cases of the iflese, then it executes the trigger, while in my case he executes right from the start.
« Last Edit: April 29, 2009, 09:49:31 AM by O Ilusionista »

Offline Fallen_Angel

  • **
  • Posts: 97
  • Referrals: 0
Re: Multiple Win/Intros
« Reply #4 on: April 29, 2009, 10:57:56 AM »
lol...I missinterpretated your post...I thought that you will have states from 190-194 and 1900-1904.

It was kind of a dejavu

Offline Red hood

  • ******
  • Posts: 2888
  • Referrals: 0
Re: Multiple Win/Intros
« Reply #5 on: March 25, 2011, 11:53:52 PM »
i would like to understand how exactly do you add a new ending or intro?
i m a total novice.  BRB

Offline aa250

  • CC Staff
  • ******
  • Posts: 6750
  • Country: 00
  • retired
  • Referrals: 0
Re: Multiple Win/Intros
« Reply #6 on: March 26, 2011, 12:12:57 AM »
My advice JT is to take a look at Shazam coding since Devmans coded a lot of intros and winposes.

Winposes stadef are going to be between 180-189 intro statedef are going to be between 190-199. :)

There are different ways to code intros and ending.