
updating a older script from before Custom Status Markers
This works if the Status marker is from the default set
// MISERABLE
// this initiates the attribute 'miserable' not only the value of it
var miserable_attribute = findObjs({
_characterid: characterid,
_type: 'attribute',
name: 'miserable'
})[0] || createObj('attribute',{characterid: characterid, name: 'miserable'});
if (
// hope is below or equal shadow, but not if shadow is 0
(parseInt(hope, 10) <= parseInt(total_shadow, 10) && parseInt(total_shadow, 10) != 0) ||
// in case it has been set manually by the player, e.g. as result of a hazard
(miserable === '1')
) {
// optional: send a message to everyone
// but send the message only on state changes
if (miserable === '0') {
sendChat('character|'+characterid, '/me is miserable!');
miserable_attribute.set('current', '1');
}
tokens.forEach(function(token) {
// #98000
token.set('status_bleeding-eye', '0');
}, this);
}
else if (
(miserable === '0') ||
(parseInt(hope, 10) > parseInt(total_shadow, 10))
) {
miserable_attribute.set('current', '0');
tokens.forEach(function(token) {
// transparent
token.set('status_bleeding-eye', false);
}, this);
}
else {
return;
}
}
However if I change the bleeding-eye to my-status-marker (my-status-marker is the name of the custom status marker image) the image is on a custom status marker set yes its in my library and set in game but does not work.
so the question is do we have to add something to the call, to be able to use custom status marker sets from the API, I couldn't find any documentation on this. any help would be appreciated