ID:171093
 
How do I make something of a type determined at runtime?
Sgeo wrote:
How do I make something of a type determined at runtime?

That is done simply by creating a var containing the type path. Like this:
var/fruit_type = /obj/fruit/apple
var/obj/fruit = new fruit_type()



/Gazoot
In response to Gazoot
That was exactly what I needed. Thanks!
In response to Sgeo
Sgeo wrote:
That was exactly what I needed. Thanks!

Glad I could help with that kind of accuracy. :) If you have more questions, go ahead and ask.


/Gazoot