Coding Question

Started by SerenityFirefly, January 11, 2011, 07:07:52 PM

Previous topic - Next topic

Cyanide

As you've posted it at MI, this is a variable initiated attack. It's a somewhat common method for using 1 state to launch different effects that all do a similar thing.

put this in your triggers

triggerall = var(X) := random%3 || 1

That will assign the variable to any one of 3 values 0,1,2. If it's 0 the || 1 will ensure the line triggers anyway as var assignment if set to 0 cancels the trigger out and makes it not work. var(X) is obviously not the right variable as well.


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.

SerenityFirefly

Right ok cool i think its var(5) in the cns file.  And speaking of Var's when going through the cns and the cmd i see var's used a lot..some cns have a description of what each one does...but some dont have the explanation. So i have some questions.

1) How do you define a var in cns?
2) Is it standard to set all your vars in the cns file? or is it creators preference?

Cyanide

Anywhere you can type code you can set a variable.

varset varadd varrangeset varrandom


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.