ID:171860
![]() Jul 31 2004, 8:54 am
|
|
Could someone gimmie a crash course in Global Vars? Like How do I modify them and do Checks and stuff. Its for an RP Mode.
|
![]() Jul 31 2004, 8:56 am
|
|
A global var is like a normal var, except there is only one. If you have mob/var/global/X, X will be the same for all mobs.
|
I'll give you a simple introduction.
To make a variable that'll goto the entire world (meaning there can only be one of that name, or you'll get variable name errors) do this:
var/Variable=0
That means the variable Variable is set to 0. You can simply change the variable as you would with any other variable, like so: mob/verb/Change_Variable(N as num) Simple, easy, efficient. |
ok so how would I go about doing check? Like if Roleplay = 1 I want say to reach only those in view. So would I just do this?:
if(Roleplay == 1) view(6) <<"Blah" if(Roleplay == 0) world <<"Blah" |
u should read the bulletproof article by Garthor to see y wot u did is wrong.
and no i cant help on global vars if u wanna know. |