variable issue

Started by sgn15, January 18, 2013, 06:15:33 PM

Previous topic - Next topic

sgn15

I tried intpersistindex but variable persists between both rounds and matches.

so how do I persist the variable values only for rounds?

not sure about this but just for clarification for the sake of this question, what i meant was:
rounds - same enemy
matches - different enemies

Rajaa Retired

Variables don't persist between matches. You're doing something wrong.

Cyanide

Rajaa: They will with intpersistindex etc set.

You'll need to override state 5900 and make use of a variable

In roundstate 2 in the first round have a variable set to matchno

in 5900, varrangeset if matchno != variable.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Rajaa Retired

I thought variables didn't transfer between matches, only rounds. All this time.

Cyanide

All those score things would be utterly pointless if that was the case  ;P


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Rajaa Retired

I just finished coding a very elaborate and complex  score system, and I am now convinced that reality has been bent into my favor.

Freaking space time continuum!

2OS

Quote from: Cyanide on January 18, 2013, 10:27:04 PM
Rajaa: They will with intpersistindex etc set.

You'll need to override state 5900 and make use of a variable

In roundstate 2 in the first round have a variable set to matchno

in 5900, varrangeset if matchno != variable.

what's the point of that

trigger1=roundno=1 is the same thing minus wasting a var

Rajaa Retired

!roundsexisted works too. I think that's the default trigger.

2OS

oh yea.

the docs ( kfm ) say override 5900 if you do want match persistence.

so really that means he overrode it and he needs to un-overrode it.

Cyanide

He's using intpersistindex, it does the same thing.

QuoteVariables with this index and above will not have their values
;reset to 0 between rounds or matches. There are 60 int variables,
;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
;If omitted, then it defaults to 60 and 40 for integer and float
;variables repectively, meaning that none are persistent, i.e. all
;are reset. If you want your variables to persist between matches,
;you need to override state 5900 from common1.cns.
You know, it actually says one thing then says the other. I've just checked, option 2 is apparently in effect, you will need to override 5900.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

sgn15

wow, did not expect to see many replies. but i have a question again

QuoteIntPersistIndex = Variables with this index and above will not have their values reset to 0 between rounds or matches. There are 60 int variables, indexed from 0 to 59. If omitted, then it defaults to 60, meaning that none are persistent, i.e. all are reset. If you want your variables to persist between matches, you need to override state 5900 from common1.cns.

the OR in the bold phrase bothers me.

I never tinkered with my state 5900, whether about variables or something else, as in totally no changes whatsoever. So at least for my char, without anything changed/added to state 5900, intpersistindex affects both rounds AND matches, not OR as stated there above (and needing to override 5900 for it to persist between matches).

so which is true and correct? I'm confused

Cyanide

If it works that's great. I just tried it myself and it didn't. So i am unsure what to think.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.