States are just the state that the script is in.
It will only do things that are in the state that is required.
Example if you wanted a hurt zone to only hurt the player once you would do this.
:state=0,plrwithinzone:plraddhealth-=10,state=1
:state=1:nothing
Now, translated into english.......
The first colon ( : ) means IF.
The second colon ( : ) means THEN.
The commas ( , ) mean AND.
So, translating the above code.
If the state is 0 and the player is in the zone Then remove 10 health from the player (that is why we have the -) And set the state to 1
Then the second line.....
If the state is 1 Then do nothing
The state command (state=x) can be used either in the IF section or the THEN section.
If it is in the THEN section it changes the state, if it is in the IF section it checks if the state is x. (x being the number)
Some people like to use a combination of single and double digits.
E.G.
state 1
state 2
state 3
state 10
state 20
state 30
or they just count up, E.G.
state 1
state 2
state 3
state 4
etc.
It's up to you really.
If it is a large script you may want to seperate it up so that different effects have different numbers of digits.
If you search for "fpi maker" you will find a brilliant tool that helps you a lot.
Basically when you put the first colon it gives you a long list of "IF" statements to choose from, and when you put the second it gives you a load of "THEN" statements.
Also, another thing, if you put :: at the beginning of a line, it will automatically do it
.
I hope that helped you.
E.D.