Basically I'm setting monsters race, $npc.race, as either "$race1", "$race2" etc and having the actual $race1 etc being objects that house that race of monsters stats. I need to get to a number that is say, kept in $race1.variable.
So I need to be able to add $npc.race (returns $race1) and .variable together to get at the number kept in $race1.variable.
The only way I am able to figure out how to do this, it gives me strings. I have also tried Number() and parseInt(), but those return blank.
What trick am I missing?
So I need to be able to add $npc.race (returns $race1) and .variable together to get at the number kept in $race1.variable.
The only way I am able to figure out how to do this, it gives me strings. I have also tried Number() and parseInt(), but those return blank.
What trick am I missing?