I have two objects which share a class. Both have a property (called “slot”) which contains a string. For both objects it’s slot “head”. Now I want to check (in the class object) if these properties are identical. So I objectloop til I find the object I want object 1 to compare with, and compare the properties.
Problem: obj.slot and self.slot are not identical, though they both have the value “head”. Debugging shows they have different integer values. Why is that so, and how can I work around it?
You want the I6 extension istring.h, which can be downloaded from inform-fiction.org/extensions/complete.html. I’ve never used it, but it should allow you to compare two strings and find out if they’re identical.
Also, BTW, the link that I gave was to the list of extensions on the I6 website. That list hasn’t been updated in about 4 years. There may be a few newer extensions in the if-archive.
In fact, I’m pretty sure there’s at least one. I didn’t see my EventList.h extension on the I6 list, and it was in the archive the last time I looked (at http://www.ifarchive.org/indexes/if-archiveXinfocomXcompilersXinform6XlibraryXcontributions.html). You might find it useful. It implements TADS-style event lists in I6. These objects are useful, among other things, for having your NPC choose from a list of default conversation responses (for a less boring game transcript). They can also fire off complex events, if desired.