A place to have fun with Mugen
 
PortalHomeFAQMemberlistSearchRegisterComic WIP TrackerDownloadsLog inChat
Translate the Website
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Latest topics
» I would like to give BIG "thank you" to all sprite artists!
by chuchoryu Today at 9:57 pm

» Tekken chuchoryu proyect
by chuchoryu Today at 9:47 pm

» Let's make your own meaning of "M.U.G.E.N"!
by goodbot16 Today at 9:41 pm

» Axel Stone by Nexus Games/Shin Mako & SeanAlty - 100 Youtube Subs Release
by MEWTWO! Today at 9:24 pm

» Eric Draven [The Crow]
by ParaDo0x Today at 7:47 pm

» Riddick
by ParaDo0x Today at 7:40 pm

Special Features at MMV








Share | 
 

 random stateno triggers

View previous topic View next topic Go down 
AuthorMessage
Minun



Posts : 142
Join date : 2015-03-08

PostSubject: random stateno triggers   May 25th 2015, 9:00 pm

So we can randomly play sounds, have characters take a random chunk of damage,  and randomly change their intros and win poses. However, I wanna know how to have characters use random variants of their attacks such as in Smash Brothers. If you payed attention, certain character moves such as Luigi's forward charge attack has his hand go either upwards or straight forward and I want to do something like that...


(To cut that all down, how do I make characters use variants of certain moves by random)
Back to top Go down
View user profile
borewood2013



Posts : 3162
Join date : 2014-08-11

PostSubject: Re: random stateno triggers   May 26th 2015, 2:19 pm

Sorry I am not a SSB expert.  But in MUGEN there are several ways to make your character use different moves randomly.

The easiest way is the "Random%#" way:
- for example, your MUGEN character's D,DF,F,x command has four (4) different types of move states, like, 1000/1010/1020/1030, in your ChangeState value = you can use "Random%4" for randomly using the four (4) different move states:

Code:
[State -1, ChangeState]
value = 1000 + (Random%4)*10
triggerall = AIlevel = 0
triggerall = Command = "236x"
;;;triggerall = StateType != A  ;;;;;;;; if any of the 1000/1010/1020/1030 move states have mixed StateType then you probably don't need this trigger
trigger1 = Ctrl = 1

What does "(Random%4)" mean?  It means any random number from 0 to 999, Mod by the number of 4, so there are only four (4) possible results:  0,1,2,3
So, the "1000 + (Random%4)*10" results in any four (4) 1000/1010/1020/1030 states only.

There are some more ways which involve using MUGEN variables and VarRandom and might be the VarRangeSet state controllers, that can give you more control.
Back to top Go down
View user profile https://onedrive.live.com/?cid=7DB65F02B0BBD12E
Minun



Posts : 142
Join date : 2015-03-08

PostSubject: Re: random stateno triggers   May 26th 2015, 2:31 pm

@borewood2013 wrote:
Sorry I am not a SSB expert.  But in MUGEN there are several ways to make your character use different moves randomly.

The easiest way is the "Random%#" way:
- for example, your MUGEN character's D,DF,F,x command has four (4) different types of move states, like, 1000/1010/1020/1030, in your ChangeState value = you can use "Random%4" for randomly using the four (4) different move states:

Code:
[State -1, ChangeState]
value = 1000 + (Random%4)*10
triggerall = AIlevel = 0
triggerall = Command = "236x"
;;;triggerall = StateType != A  ;;;;;;;; if any of the 1000/1010/1020/1030 move states have mixed StateType then you probably don't need this trigger
trigger1 = Ctrl = 1

What does "(Random%4)" mean?  It means any random number from 0 to 999, Mod by the number of 4, so there are only four (4) possible results:  0,1,2,3
So, the "1000 + (Random%4)*10" results in any four (4) 1000/1010/1020/1030 states only.

There are some more ways which involve using MUGEN variables and VarRandom and might be the VarRangeSet state controllers, that can give you more control.

No, no...

Not the AI. The player character itself. Let's say your move is a spin kick. There will be a 50% chance that you will trip and fall when doing that spin kick.
Back to top Go down
View user profile
borewood2013



Posts : 3162
Join date : 2014-08-11

PostSubject: Re: random stateno triggers   May 26th 2015, 2:47 pm

>> Not the AI.

My example is for human commands only.  It has the "AIlevel = 0" trigger so A.I. is not able to use these randomly input states at all.

>> Let's say your move is a spin kick. There will be a 50% chance that you will trip and fall when doing that spin kick.
This has nothing to do with random move states then.  Perhaps I misunderstood you.
So, let's say StateDef 250 is a spin kick move state.  Then you need to make two (2) HitDef state controllers - a HitDef that trips and makes P2 fall upon hit, another HitDef that forces P2 to stand upon hit.
For 50-50 chance for both HitDef's, use some trigger like:
HitDef#1 trigger1 = Random % 2 = 0
HitDef#2 trigger1 = Random % 2 = 1

Did I get it right this time please? Question
Back to top Go down
View user profile https://onedrive.live.com/?cid=7DB65F02B0BBD12E
Minun



Posts : 142
Join date : 2015-03-08

PostSubject: Re: random stateno triggers   May 26th 2015, 3:15 pm

@borewood2013 wrote:
>> Not the AI.

My example is for human commands only.  It has the "AIlevel = 0" trigger so A.I. is not able to use these randomly input states at all.

>> Let's say your move is a spin kick. There will be a 50% chance that you will trip and fall when doing that spin kick.
This has nothing to do with random move states then.  Perhaps I misunderstood you.
So, let's say StateDef 250 is a spin kick move state.  Then you need to make two (2) HitDef state controllers - a HitDef that trips and makes P2 fall upon hit, another HitDef that forces P2 to stand upon hit.
For 50-50 chance for both HitDef's, use some trigger like:
HitDef#1 trigger1 = Random % 2 = 0
HitDef#2 trigger1 = Random % 2 = 1

Did I get it right this time please? Question

Both your methods are helpful (I understand the first one now)
I will get to it once I go back to MUGEN.
Back to top Go down
View user profile
 
random stateno triggers
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
The Mugen Multiverse :: Mugen :: Mugen Help-
Jump to: