
I want to concat the values that the getAttrs function gets. I put this together based off someone else's code, but somehow mine is broken. on("change:stunned change:shock sheet:opened", function() {
console.log("===============================");
console.log("****!!!Update-Conditions!!!*****");
getAttrs(['stun_name', 'shock_name'],function(values) {
getConditionNames(function(currentConditions) {
const conditionNames = [];//We'll collect all the attribute names in here.
console.log(` cond count: ${currentConditions.length}`);//using object literal notation makes your log declarations easier to read
for(var i=0; i < currentConditions.length; i++) {
console.log(` cond idlen:${currentConditions[i].length}`);
console.log(` cond id:|${currentConditions[i]}|`);
idCollection.push(currentConditions[i]);//push the attribute name into the collection array
}
});
var conditions = currentConditions.join(", ");
setAttrs({
current_conditions: conditions
});
})
});