Now, I admit I wasn't really thinking when I said about sleep, but it's but there's really no point in using findText() on a string of ckeys, since it's only relevant to case and ckeys will always be lowercase.
Also, what you said didn't make much sense ('Kaiok' versus 'Kaioken'), since both findtext() and findText()) will return the first instance of the string they're looking for. You'd want to include '|', like you're doing. I was mainly just questioning the use of it when it's not really needed.
Popisfizzy wrote:
but there's really no point in using findText() on a string of ckeys, since it's only relevant to case and ckeys will always be lowercase. More like, there isn't any point in using findtext() on it, hence I'm using findText(). Why? findText() is probably faster, since it doesn't need to check for case -- just a direct search/compare. Like, to compare strings in DM itself for example, to check case you have to use something like cmptext(), but non-case sensitive checking is obviously faster and can be done with just the == operator. Also, what you said didn't make much sense ('Kaiok' versus 'Kaioken'), since both findtext() and findText()) will return the first instance of the string they're looking for. You'd want to include '|', like you're doing. I was mainly just questioning the use of it when it's not really needed. I guess this ties in to the previous point. Yes, both findtext() and findText() will find the same, but just as I said, findText() should be slightly faster. |
kaio
i cant save the doorway because its a turf...if i change it to a obj i cant use the Enter() proc. |
Chase_Hammer wrote:
i cant save the doorway because its a turf... What? You can save turfs too, nothing stops you from doing it. Also, as suggested, if wanted/needed you can just save the strings with identifiers/references to their turfs (tags or coordinates will do) and restore them to the created turfs later. if i change it to a obj i cant use the Enter() proc. Well, you can, all atoms have Enter() etc, but in that case the Enter() proc will run if you're trying to move something to INSIDE the /obj, aka in the obj.contents/"inventory", which isn't the same as moving to inside a turf. But, in that case, you could still use something like adding a Trigger() proc - read up here: [link], [link]. |
Well, if you already save the door object, it will be saved along with it. If not, perhaps you'll still want to anyway, as you may add in door customizabillity or whatnot later on (?), but you can save just the string if you want.
To save the string, put it in a savefile in a directory that is unique for each door, then load it on turf/door/New().