
Context: I am a gamer with an understanding of the very basics of coding. Situation: I am working on modifying the API script "The Darkness Is Closing In" to check for whether the character has the "All Players See Light" checkbox checked. The unaltered script is: on("change:token", function(obj, prev) { //Only do this if we actually moved. if(obj.get("left") == prev["left"] && obj.get("top") == prev["top"]) return; obj.set({ light_radius: Math.floor(obj.get("light_radius") * 0.90) }); }); Issue: I am unable to properly format the new IF line. The plain language is: "If All Players See Light property is false, then return (don't execute the remainder of the script). This is what I currently have written that is not correctly catching the instance where the condition where property is false (unchecked): on("change:token", function(obj, prev) { //Only do this if we actually moved. if(obj.get("left") == prev["left"] && obj.get("top") == prev["top"]) return; if(obj.get("light_otherplayers") !== false) return; obj.set({ light_radius: Math.floor(obj.get("light_radius") * 0.90) }); }); Any assistance as to the proper syntax would be appreciated.