Why not make a way in which u can use like item A.VarValues = B.VarValues
that would be good if u could do that...
ID:263745
Sep 25 2007, 5:05 pm
|
|
In response to Lummox JR
|
|
so how would i make object A inherit all properties of item B?
|
In response to Super Silly Stuart
|
|
taken from the help.
vars list var (datum) See also: initial proc issaved proc list list associations This is a list of all the variables belonging to an object. The items in the list are the variable names. If the variable name is used as an index into the list, the value of that variable is accessed. Example: mob/verb/dump() This example displays all the variables belonging to your mob. |
In response to Fusioneko
|
|
NOT VIEWING, making object A have all its vars = to object B
which is why this was under byond features before... |
In response to Super Silly Stuart
|
|
This is so when i edit object A's vars via an edit verb, i can clone all the item's variables over to the new object i created at an earlier time.
|
In response to Super Silly Stuart
|
|
Super Silly Stuart wrote:
This is so when i edit object A's vars via an edit verb, i can clone all the item's variables over to the new object i created at an earlier time. mob/verb/dump() IF YOU KNEW how to work in DM In the first place, You'd understand. You have to dump all the object variables into a list, that objects vars are then put into the inherited object as such. It's not that hard, Do you WANT ME TO WRITE AN EXAMPLE? Why can't you figure it out yourself. ITS SIMPLE. |
In response to Fusioneko
|
|
DUDE, that tells u the vars of both, thats not doing crap...
u did use the USR << command which makes it show in the text..... and if u took usr out if u deleted the first object, the second object would also get deleted.... |
In response to Super Silly Stuart
|
|
Super Silly Stuart wrote:
DUDE, that tells u the vars of both, thats not doing crap... That was an example, Let me write it for you. |
In response to Super Silly Stuart
|
|
well, just if i knew how to do it, i would do it, so of course i need it done for me.... lolz
|
In response to Super Silly Stuart
|
|
Super Silly Stuart wrote:
well, just if i knew how to do it, i would do it, so of course i need it done for me.... lolz obj WELL I actually don't know how to fully do it, If you know about objects and how to set their variables onto them try setting ti and using this to modify requires a bit tweaking, Most of my projects have been fully text based, So I merely just can't get you the best result yet. |
In response to Fusioneko
|
|
i used this, and got it to do some var settings, but i had to create a base including all the variables i wanted changed, the code wasnt able to look through the list i made it make, to do duplication of the vars
|
In response to Lummox JR
|
|
i do however have another problem
http://developer.byond.com/forum/ index.cgi?action=message_read&id=587419&forum=8&view=0 |
In response to Fusioneko
|
|
Fusioneko wrote:
Super Silly Stuart wrote: > mob/verb/dump() IF YOU KNEW how to work in DM In the first place, You'd understand. I dont even understand this stuff... Could you post an example? Because I need it to complete this Geti Star code for Empire, so the metas created inherit all variables of the original mob. |
In response to Dragonn
|
|
mob/GetiClones/proc/Inherit(mob/M)//mob/M would be the mob the geti clones get their variable values from Hope that helps. |
We have this, actually; it's the vars list.
Lummox JR