ID:179066
 
How would you make something like a variable that isn't set on a mob or player?
such as telling the game that something is occupied or being used with an if/else?
var/world_wide_variable = 1

Just don't put anything behind the var/
Vermolius wrote:
How would you make something like a variable that isn't set on a mob or player?
such as telling the game that something is occupied or being used with an if/else?

One approach is global variables. You can define them anywhere and access them anywhere:

var/my_global

mob/Move()
if (!my_global)
src << "No one is allowed to move right now!"
return
return ..()
In response to Deadron
thanks :>
In response to Vermolius
I notice this post is quite old but I am having trouble with something similar to this.
Once you have a
var/world_wide_var
how would you represent that in code like when you have a var on a mob
mob/var/mobsvar - usr.mobsvar or src.mobsvar ect
but
var/world_wide_var - ?
I need to know what you put to represent the var/world_wide_var as to the usr or src in the mob/var/mobsvar.

kinda confusing but
please help
and thanks in advance