In the guide, it states that if a variable is to hold a datum reference, its type needs to be defined; as in obj/O. What if I had a procedure that needed to be able to receive multiple datum types as arguments? For example, if I had a command that the GM could use on either a /mob/player or a /mob/npc, how would I reference it?
Am I expected to maybe do something like have a /mob/active/player and /mob/active/npc instead, and simply use the var mob/active to accept both as an argument? Anything similar between players and npcs would obviously be declared on the mob/active type. Or, is there another way to do it?
=$= Big J Money =$=
ID:153060
Feb 27 2005, 6:46 pm
|
|
you can send the proc anything and it will check what type of object it is, and make a new variable to reference that object according to the type of the object passed to it.