Hi! I’m working on a game where the player goes around picking stuff up and giving it to other characters.So I have this var theItem that is the item currently selected in the players inventory and on the characters I have the var questItem and when you get in range of the character and press space I check if theItem == questItem and stuff happens.
My problem is I can’t get questItem to be either e.g. “glasses” or “coin”.
Here is my fail:
var iWant = new Array(“glasses”, “coin”);
for (i = 0; i < iWant.length; ++i)
{
** this.questItem = iWant*;**
** trace(iWant*);**
**}
**Any ideas how i can get it to have more than one value?