Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Please explain states

Author
Message
General Jackson
User Banned
Posted: 10th Feb 2009 22:50
Help. i am learning to script and i just dont understand about the states. could someone please give a in depth explanation?

It is well that war is so terrible or we should grow too fond of it- Robert E Lee
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 10th Feb 2009 22:57
The Comunity Guide.

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
General Jackson
User Banned
Posted: 11th Feb 2009 00:45
I looked at that but i just dont understand it. i am trying really hard i just dont get it.

It is well that war is so terrible or we should grow too fond of it- Robert E Lee
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 11th Feb 2009 01:17
Ok; the state is what controls when a particurlar line of code starts to function. For example, this script;

Says that "when the state is equal to 0, set the state to 1." When the state value in the conditions is met, it will proceed to do all of the commands after the 2nd colon.
You can use the "state=X" command in 2 different ways; as a condition and as an action. In this code;

":state=0" is a condition, which will be met automatically at the beginning of any script. ":state=1" is an action, which sets the internal variable "state" to 1.

That's the best explination I could come up with, but almost every script relies on states. LEARN THEM!

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!

Login to post a reply

Server time is: 2025-05-23 17:32:17
Your offset time is: 2025-05-23 17:32:17