Hey, All,
I've been asking for a lot of help recently, and I appreciate your assistance.
I've learned how to sequentially clone objects, and to do so without having to repeat the rules for each new object. Setting the item.alt for a known clone, like key1, is easy. I'm having trouble creating an alt for an unknown clone.
I have an attribute of player.stuff that's an integer. I would like, each time a clone of any object is created, to set the current player.stuff integer as an alt for that clone.
this.listalias = player.stuff + ": " + this.realname
this.alt = player.stuff
CloneObjectAndMove (this, player)
msg (this.realname + " added to cart.")
this.listalias = this.realname
this.alt = this.realname
IncreaseObjectCounter (player, "stuff")
This is what I have, as a script on an object type, where realname is an attribute on each object that I want to be the listalias of each item.
However, after I 'verb' the item in question, I can't seem to 'look at' either the original object or the clone using either the original name or the alt. I get this error, "Error running script: Cannot foreach over '7mm Longarm' as it is not a list".
I THINK what's happening is that it no longer recognizes item.alt as a list... but I don't know how to fix it.
Can you guys help me?
Thanks.