Jump to content
Due to a recent security issue, we are now mandating Security Questions on all accounts until further notice. In addition to this, we urge everyone to change your passwords as soon as possible. ×
  • 0

Trying to code explods to be turned off in an option.txt doc


RockRage8962

Question

After hearing feedback on Rainbow Dash Revamped and the desire people have to turn the cutscenes on and off via a text document I have been trying to code in an options.txt file to allow people to change the value so that the cutscenes can be turned on and off by simply editing a value number. I have been running into issues however and am not sure how to code it properly. I have tried finding some help to code this, but have had no luck in finding anything that helps. I have heard that I have to code something into the -2 state along with modifying the explods and options document, but I'm not sure what I need to code in to make this work. I will momentarily post the coding I have done so far in case people are confused as to what I am talking about.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

In addition, MUGEN code in your options.txt doesn't necessarily belongs to [statedef -2].

You can also use an overridden Statedef 5900 for that purpose.

 

An example of an overridden Statedef 5900 to be put into your options.txt:

; Initialize (at the start of the round)
[Statedef 5900]
type = S

; cutscene options
[State 5900, VarSet]
type = VarSet
trigger1 = 1  
v = 35   ;;;;;;;;;;;;; you may need to use any not-in-use integer variable number (from the values of 1 to 59)
value = 1    ;;;;;;;;;;;;  "1" for enabling cutscene; "0" for disabling cutscene

[State 5900, 4] ;Intro for round 1
type = ChangeState
trigger1 = roundno = 1
value = 190

[State 5900, 5] ;All other rounds
type = ChangeState
trigger1 = 1
value = 0

Then, in your cutscene MUGEN code (Helpers and/or Explods) Trigger(s), add the checking of the value of the integer variable number, var(35).

 

Sometimes, even a Helper (with ParentVarSet state controller) can be used, instead of using an overridden Statedef 5900, for some MUGEN character configuration files like yours.

Link to comment
Share on other sites

  • 0

The easieast way I can think of would be to make an options file,  with a "varset"  -2 state, and then, on every "explod" state use:

triggerall = var(X) = 1

So in that way, you could set the variable to 0 (false) or 1 (true), and the explods would only trigger if the variable was true

Link to comment
Share on other sites

  • 0

If you do go down the state -2 route, you have to make sure that you put the ENTIRE state -2 there, in your options file. You can't leave it in your character and expect this extra state to be known by your character's CNS. Another way you could do it is by spawning a helper and having the helper state in the options file. Then you just do what you need to in that file and call the helper in state -2, like:

type = Helper
trigger1 = !NumHelper(helperID)
ID = helperID
Link to comment
Share on other sites

  • 0

In addition, MUGEN code in your options.txt doesn't necessarily belongs to [statedef -2].

You can also use an overridden Statedef 5900 for that purpose.

 

An example of an overridden Statedef 5900 to be put into your options.txt:



; Initialize (at the start of the round)
[Statedef 5900]
type = S

; cutscene options
[State 5900, VarSet]
type = VarSet
trigger1 = 1  
v = 35   ;;;;;;;;;;;;; you may need to use any not-in-use integer variable number (from the values of 1 to 59)
value = 1    ;;;;;;;;;;;;  "1" for enabling cutscene; "0" for disabling cutscene

[State 5900, 4] ;Intro for round 1
type = ChangeState
trigger1 = roundno = 1
value = 190

[State 5900, 5] ;All other rounds
type = ChangeState
trigger1 = 1
value = 0

Then, in your cutscene MUGEN code (Helpers and/or Explods) Trigger(s), add the checking of the value of the integer variable number, var(35).

 

Sometimes, even a Helper (with ParentVarSet state controller) can be used, instead of using an overridden Statedef 5900, for some MUGEN character configuration files like yours.

 

 

It would seem there is still a bit of a problem left. The overridden 5900 state configuration worked, but it had some undesirable glitches as well. What happened was it worked just fine for her normal form, but it ended up screwing up in her corrupted form as the latter enters a pinch state where some new abilities become available. It should happen if said form is beaten in one round and activated in the next round. What happened was she enters said form right as the battle starts in the first round and the cutscenes end up disabled regardless of the number being set to 1 or 0. I found the coding that is to blame, but I don't know what to do to fix this issue.

This is the coding in question:

 

[state 5900, 1] ;Clear all int variables

type = VarRangeSet

trigger1 = roundsexisted = 0

value = 0

[state 5900, 2] ;Clear all float variables

type = VarRangeSet

trigger1 = roundsexisted = 0

fvalue = 0

[state 5900, 3] ;Intro for round 1

type = ChangeState

triggerall = var(57)<2

trigger1 = roundno = 1

trigger2 = var(56)>0 && roundno = 1

trigger3 = var(57)>0 && var(56)>0

value = 190

 

I'm not sure what to do about this as adding in the last part to the text document causes her intros to not play at all.

Link to comment
Share on other sites

  • 0

It would seem there is still a bit of a problem left. The overridden 5900 state configuration worked, but it had some undesirable glitches as well. What happened was it worked just fine for her normal form, but it ended up screwing up in her corrupted form as the latter enters a pinch state where some new abilities become available. It should happen if said form is beaten in one round and activated in the next round. What happened was she enters said form right as the battle starts in the first round and the cutscenes end up disabled regardless of the number being set to 1 or 0. I found the coding that is to blame, but I don't know what to do to fix this issue.

This is the coding in question:

 

[state 5900, 1] ;Clear all int variables

type = VarRangeSet

trigger1 = roundsexisted = 0

value = 0

[state 5900, 2] ;Clear all float variables

type = VarRangeSet

trigger1 = roundsexisted = 0

fvalue = 0

[state 5900, 3] ;Intro for round 1

type = ChangeState

triggerall = var(57)<2

trigger1 = roundno = 1

trigger2 = var(56)>0 && roundno = 1

trigger3 = var(57)>0 && var(56)>0

value = 190

 

I'm not sure what to do about this as adding in the last part to the text document causes her intros to not play at all.

 

You didn't mention in all previous posts that another form StateDef it is going to enter.  Anyway, the "Clear all int/float variables" state might be the cause, not sure though.

And I want to know how are your var(56) and var(57) defined?

Link to comment
Share on other sites

  • 0

I'll be sure to let you know once I get the chance. I have been a bit busy over the past few days, which is why I didn't reply sooner.

I'm going to mark this as solved since CaptainRussia said he could fix the issues I'm having. Thanks for the help though. It at least allowed RD to move further in the right direction!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...