Hi! Been playing around with Bloodied and dead, managed to figure out how to change the trigger from 50% down to 25%. But I've also been trying to get the red marker to vanish when the token "dies". I tried this: on("change:graphic", function(obj) {
if(obj.get("bar1_max") === "") return;
if(obj.get("bar1_value") <= obj.get("bar1_max") / 4) {
obj.set({
status_redmarker: true
});
}
else{
obj.set({
status_redmarker: false
})
}
if(obj.get("bar1_value") <= 0) {
obj.set({
status_dead: true
status_redmarker: false
});
}
else {
obj.set({
status_dead: false
});
}
});
The bit I added in bold and italic. It seems to stop everything from working? I'm a complete novice to the API thing, I see the if and else triggers(?) is there an unless trigger? was thinking, If bar1 under 25% redmarker Unless bar1 <= 0 Any help would be appreciated on the matter.