Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[BUG] obj.get("status_dead") not behaving as expected

1384773634

Edited 1384773844
I have found that the pseudo property "status_dead" does not behave as expected. It always reports "alive" regardless of the big red "X", unless there are no statii on the token, in which case, it reports "undefined". Below is a code snippet and the results. InfoDump code. Highlight a group of tokens, then execute !InfoDump in the chat window. on("chat:message", function(msg) { if (msg.type == "api" && msg.content.indexOf("!InfoDump") !== -1 && msg.who.indexOf("(GM)") !== -1) { log("InfoDump:"); _.each(msg.selected, function(objInfo) { var obj = getObj(objInfo._type, objInfo._id); if( obj.get("_type") == "graphic" ){ if( obj.get("_subtype") == "token" ){ log(obj.get("name") + " statii: " + obj.get("statusmarkers")); log(obj.get("name") + " dead? " + obj.get("status_dead")); } } }); } }); Sandbox console output. Restarting sandbox due to script changes... Spinning up new sandbox... "InfoDump:" "Goblin Y statii: yellow,dead" "Goblin Y dead? false" "Goblin Z statii: yellow,dead" "Goblin Z dead? false" "Goblin X statii: yellow,back-pain" "Goblin X dead? false" "Balsa statii: ninja-mask" "Balsa dead? false" "Nowon statii: " "Nowon dead? undefined" "Olaf statii: bolt-shield" "Olaf dead? false" Screenshot
1384773725
Gauss
Forum Champion
Moved to the API forum and added the [BUG] tag.
This should be fixed.
1385012346

Edited 1385012567
Verified fixed on dev. Thanks!