Created
May 16, 2013 08:46
-
-
Save anonymous/5590333 to your computer and use it in GitHub Desktop.
roll20 layer changer script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on("chat:message", function(msg) { | |
if(msg.type == "api" && msg.content.indexOf("!show") !== -1) { | |
var charName = msg.content.replace("!show ", ""); | |
var charToken = findObjs({_type: "graphic", name: charName})[0]; | |
if(!charToken) { | |
return; | |
} | |
if(charToken.get("layer") == "gm"){ | |
charToken.set("layer", object); | |
} else { | |
charToken.set("layer", gm); | |
} | |
}}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment