When we play, I tie attr_current_llife_points to one of my token's radial menu bubbles. I wrote the code below to update related values based on changes to attr_current_llife_points, through the radial menu bubbles. However, it's not getting called. My code is below. Is this not something you can do? // update life points by change in current
// TODO when I have a function to calculate maximum_life_points, move this logic into "set physical strength fields" function, as I've done with action points and agility
on('change:current_life_points', () => {
getAttrs(['current_life_points', 'maximum_life_points', 'fatal_life_points_clean'], values => {
const max_life_pnts = int(values.maximum_life_points);
const ftl_life_pnt = int(values.fatal_life_points_clean);
var crnt_life_pnts = int(values.current_life_points);
const spnt_life_pnts = max_life_pnts - crnt_life_pnts;
if (crnt_life_pnts <= ftl_life_pnt) crnt_life_pnts = "Dead (" + crnt_life_pnts + ")";
console.log('current_life_points: ' + crnt_life_pnts);
setAttrs({current_life_points: crnt_life_pnts});
});
});