ID:269010
![]() Jan 18 2005, 2:26 pm
|
|
Before I code some stuff, when loading objs from a savefile to a list, is the obj's New() proc called?
|
![]() Jan 18 2005, 2:51 pm
|
|
wouldnt the New() be creating a completely new object insted of loading the old one?
|
are you loading up a save file as if a person was logging in? or loading something..say an items list in a pop up window? what would the New() be used for if it were supposed to be used?
|
mine doesnt use the New(), but rather newmob
mob |
Nnuuu, I want to know if the New() proc is called when loading objects from a savefile that were on a list to a list. =/
|
ahaa..
well...i really couldnt say. normally it is YOU who is helping ME with codes. all i could really do if i were you would be make the code and test it out. then ask if it looks right. but you already know that. |
I don't think it would.
Lets say you add 3 swords onto a list. Then you delete every obj on that list from the world. Would you now be able to change the information that the obj has on the list and apply it to the world? Nope probably not since those objs don't exist anymore. I think the same is true here. You don't have a hard copy of the objs, just a list of them. You'd have to recreate every obj on the list. This is all just my theory and isn't neccessarily true. *Edit* By the way, I posted in your hr_gametime demo's forum Hell Ramen. |
Of course it's valid! It may or may not do anything in that example (it will if atom/New(), atom/movable/New(), or obj/New() have been overridden elsewhere), but either way it's perfectly valid.
The only place that ..() shouldn't go is in a proc that's defined explicitly (with "proc" in its path), rather than overridden: mob/proc/blahblah() |
Well I said that based on what Lummox JR said to someone else:
[link] I may have just interpreted him wrong. |
Yes, you did misinterpret him I'm afraid. Rather badly. =)
Lummox JR wrote: (in [link]) It [..()] means "do what this proc would have done if I hadn't overridden it". You don't use it in new verbs/procs. |
I think you're mis-interpretting "you don't use it in new verbs/procs" as "you don't use it in New verbs/procs." By "new verbs/procs" he means ones you just declared, as Crispy pointed out. =)
|