Michael P. said: If the api you would have to do an if() tree to find what the value was set to. Keep in mind you will have to also get some basic info on the token such as its ID then parse that into the name, which I will refer to as who.id in this code (that's another question for later if need be) if (getAttrBtName(who.id, "gender") == 0)
{
var gendPos = "His";
var gendRef = "Him";
}
if (getAttrBtName(who.id, "gender") == 1)
{
var gendPos = "Hers";
var gendRef = "Her";
}
if (getAttrBtName(who.id, "gender") == 3)
{
var gendPos = "It's";
var gendRef = "It";
} Switch would be better. =) on('change:attribute', function(obj, prev) { if (prev.name != 'gender') return; var pronoun = findObjs({ type: 'attribute', characterid: obj.get('characterid'), name: 'pronoun' })[0]; if (!pronoun) { var pronounDefault = getAttrByName(obj.get('characterid'), 'pronoun'); pronoun = createObj('attribute', { characterid: obj.get('characterid'), name: 'pronoun', current: pronounDefault }); } switch (obj.get('current')) { default: case 'Male': pronoun.set('current', 'Him'); break; case 'Female': pronoun.set('current', 'Her'); break; case 'N/A': pronoun.set('current', 'It'); break; } }); And you can certainly put "Male" or "Female" in the value attribute of the option element; you don't need to create an integer-string mapping. As to the initial question, you can update multiple variables with a single change... if you can auto-calculate those other variables . You can't do that with strings, unfortunately.