ID:169846
 
Hey, I have a quick question about Datums.

First off, I'd like to state that I am an elitist noob developer with BYOND ( I was formerly known as Lenox ). Second, I have a question about datums ( I've sort of forgotten something ) and vars. If I create a var in a datum, isn't it unique for each instance of said datum?
If I understand you correctly, then yes. =) If you don't like it that way you could define it as global.
In response to YMIHere
Hey, thanks for the help, but I have another question. I've read the documentation as well as thought back to as far back as I can remember, but I'm still not sure: How do you create an instance of a datum? I've included the src file of the datum, but I forgot how to instanciate (sp?) it.

I've tried this:

var/datum/(datumName)/a = new (datumName)( src.name ) // This is in a mob/proc


( I set the datum's new to accept a mob/m var )

Thanks for any help,



-Lenox
In response to Audeuro
isnt that just a global var?
In response to Itachi1
Please ignore that last question, I solved it, thanks. ( Yes, it would be a global var ( the instance ) )