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.

Author
Message
Stealth Sin
10
Years of Service
User Offline
Joined: 18th Nov 2013
Location:
Posted: 28th Sep 2017 21:27
Okay I just want to sum this up, so I've been making my own scripts, but I've never really thought about this, what what is the definition of each state?
Anthony Gonzales
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 28th Sep 2017 23:28 Edited at: 28th Sep 2017 23:31
"state=" is both a condition and an action.

The first use of state= in a line of code:
:state=0
is a condition. In other words, what is the condition of state?
if state = 0 is true, then the condition is true.
Since all scripts initialize state at "0", it would be true.

If the condition is true, the engine will process that line of code.
If the condition is not true, the engine will skip that line of code.

The second use of state= in a line of code:
state=1
is an action. It does something. It changes the value of state to "1"
Now the engine will only process line of code in which the condition is state=1.

Put simply, state= is a way of advancing your script to the next level, somewhat like line numbers.

Content and tools for games
Mriganka
9
Years of Service
User Offline
Joined: 16th Jun 2014
Location: Virtuality
Posted: 29th Sep 2017 09:05
States are used as... you know... states. Like at this state do this and then go tho another state. In that state do that. It is like a variable that is used with an if condition and then is used with goto to make a loop. You can also compare it to for, while or do while loops, but can be broken in the middle and entered in the middle as well.
Stealth Sin
10
Years of Service
User Offline
Joined: 18th Nov 2013
Location:
Posted: 29th Sep 2017 23:30
okay thx, but also I know how to create a varaible, but with FPI edit path they say that dimvar [myvariable] is not a valid syntax. but yet, when I look in the nomanmod, their water script is used wit dim var var equal var greater and so on, when I use it in my own scripts, they are not valid? could this be because i'm not assigning them right, or even using them in the right way? if you need to see my script, ask me so I can upload it.
Anthony Gonzales

Login to post a reply

Server time is: 2024-03-28 09:05:39
Your offset time is: 2024-03-28 09:05:39