Hi folks, I try to create a macro via api, works so far, but I want it to be visible only to the GM. I get the logged in player (at the time the macro runs only one player, the GM, is logged in) at the start of the script. Now I create the macro: var player=findObjs({_type:'player'})[0];
createObj("macro", {
name: "Test",
action: "[[d100]]",
visibleto: player.get("_displayname"),
playerid: player.id
}); log(player.get("_displayname")) shows me the correct name, so this should work. Creates the macro, but the "visible to" box is empty. How can I make it visible only for me? Bonus question: I can set the parameter "istokenaction", but I need to set whether it is visible in the macro quickbar, is there a parameter for that?