Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
learngs2:variables [2023/02/24 12:46] – twinny | learngs2:variables [2023/02/24 12:47] (current) – twinny | ||
---|---|---|---|
Line 49: | Line 49: | ||
You may have noticed all variables so far have started with this. This creates the 'scope for the variable which defines where it exists and potentially for how long. There is a few we can use: | You may have noticed all variables so far have started with this. This creates the 'scope for the variable which defines where it exists and potentially for how long. There is a few we can use: | ||
- | < | + | < |
this. - Refers to the current object (e.g. if we are writing this in a weapon, we are created a variable that exists and is accessible in the weapon) | this. - Refers to the current object (e.g. if we are writing this in a weapon, we are created a variable that exists and is accessible in the weapon) | ||
thiso. | thiso. | ||
Line 57: | Line 57: | ||
clientr. - These are very similar to client. flags but they are different in that they can only be read and not written from clientside: we will come back to this! | clientr. - These are very similar to client. flags but they are different in that they can only be read and not written from clientside: we will come back to this! | ||
server. and serverr. - These are variables which are stored in the server itself. We do not need to focus on these for now | server. and serverr. - These are variables which are stored in the server itself. We do not need to focus on these for now | ||
- | |||
- | This is likely very confusing but again, it will make sense the more you learn and practise with the concepts coming in these lessons! | ||
</ | </ | ||
- | + | < | |
- | For now, we can move on | + | |