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

Token property for is visible.

I can't seem to find the property for whether a token should be rendered or not. Any help? Leigh
1504712384
The Aaron
Pro
API Scripter
You're talking about hiding a token from players until the right time?  That's controlled by whether the token is on the token layer (visible to players) or on the gm layer (visible only to the gm).
1504712581

Edited 1504713264
I mean prevent the token from rendering at all. So no matter layer it's on it won't be seen.
1504713211
The Aaron
Pro
API Scripter
I'm not sure your meaning is coming across, but you can just delete it if you don't want it shown at all.  If you assign it to a character (set as default token), you can drag it easily back onto a map later.
If I delete it won't it be gone? How can I show it again?
Maybe it will be more clear if I explain why I need it I want to flag all the objects on a layer and mark them hidden so I can easily see what is on another layer.
1504713625
The Aaron
Pro
API Scripter
It will be gone.  You would need to drag it back in.  But you don't have to do that if all you want to do is hide it from the players in your game.  You can put it on the GM Layer and only GMs (probably only you, if you've not promoted anyone) will be able to see it.  That's the purpose of the GM layer, to prepare things to show to players later, or to leave notes only you can see.
1504713764

Edited 1504713814
The Aaron
Pro
API Scripter
Objects on the GM layer show up as semi-transparent.  Being a pro subscriber, you might enjoy my Bump script.  It adds a purple aura on tokens that are on the GM layer, and a green one on tokens that are on the Token layer.  It also provides a command for moving tokens between the two, and set up a way to manipulate those tokens from either layer.
1504713792
The Aaron
Pro
API Scripter
Bump:&nbsp;<a href="https://app.roll20.net/forum/post/2956622/script-bump-updated-to-v0-dot-2-7" rel="nofollow">https://app.roll20.net/forum/post/2956622/script-bump-updated-to-v0-dot-2-7</a>
1504713842

Edited 1504715172
Wait, what? Are you saying you can't get there from here? There is no don't render option for a token?
1504714513

Edited 1504714667
The Aaron
Pro
API Scripter
The visibility of a token is not a setting on the token, it's a function of what layer the token is on. &nbsp;Tokens on the GM layer will not render for players. &nbsp;If you don't want to see a token AT ALL, you can remove it. &nbsp; Put another way: From the point of view of a player, the "don't render" setting is moving the token to the GM Layer so it doesn't render for the players. In this case, to get it to render for players again, you would right click it and tell it to move to the token layer. From the point of view of a GM, the "don't render" setting is deleting the token so that it doesn't render for anyone (because it's gone). In this case, to get it to render again you'd recreate it by dragging it from the library or dragging a character that has it as a default token back onto the map, either on the GM Layer (so only the GM sees it) or onto the Token Layer (so everyone sees it). Bump provides an API solution that effectively gives you a render toggle, as it causes the token to simultaneously exist on both layers and lets you toggle the visibility from either.
Thank you for the help Aaron. I appreciate how fast you responded to my issue and the time you have spent. Thanks man. I want to write something that allows me to toggle the visibility of all my flickering lightning I just made so I can work on other stuff without them in the way. I don't want to see them at all until I'm playing the game and have activated them. Until then they are just cluttering everything up. Also I have a few text notes like stickies that are in the way I want to hide. I shouldn't have to write this stuff really. No one else expects this? &lt;vent&gt; I suspect I'm barking up the wrong tree here but for the love of God add the basics. I would have expected from day one to have a 'visible' property. No matter how much your code smells it can't be that hard. We have all written our fair share of stink but it can't be that bad. Even an invisible layer would be better than nothing (god help me for suggesting propagating the stink). What about even a few custom data fields I can persist on that the interface can't access? Even that I could work with. &lt;/vent&gt;
1504717906
The Aaron
Pro
API Scripter
You know, I totally missed that this was an API forum post... =D &nbsp;(I watch this view during the day:&nbsp; <a href="https://app.roll20.net/forum/alldiscussions/?catid" rel="nofollow">https://app.roll20.net/forum/alldiscussions/?catid</a>... So, you're wanting a way, with the API, to cause tokens to not be "in the way". &nbsp;Is this a matter of filtering them out when working with tokens from the API, or a question of removing them from the interface where you are manipulating things through the GUI?
Not filtering. I want them to not show up in the GUI at all. Currently I do the following: &nbsp;&nbsp;&nbsp; token.set( "layer", (bShow == true) ? "objects" : "gmlayer" ); I need to do this instead: token.set( "visible", bShow );
1504726176
The Aaron
Pro
API Scripter
One trick you can take advantage of is putting them on the 'walls' layer. &nbsp;They won't show up visually unless you explicitly select the DL layer, though they will still cast lights (I put my Torch Flicker tokens on that layer).
It's a pretty good hack for hiding your lights actually. Still it doesn't handle enough of the problem. Putting tokens or other objects into a layer that won't be seen is a one way trip. There is no information as to what layer each one came from for when you unhide. Sure you could just say always the object layer or gmlayer but it's not enough. Plus now your walls layer is a mess unless you show everything. I'm considering using a map to store custom fields for an object in the global state using the object id as the key. Then you could save the original layer name. Not sure how much time I want to burn on this though. Ready for a brutal hack? Hide an object: &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var top&nbsp;&nbsp;&nbsp; = token.get( "top" ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; token.set( "top", top - 10000 ); Show the object again: &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var top&nbsp;&nbsp;&nbsp; = token.get( "top" ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; token.set( "top", top + 10000 ); Looks somewhat odd as objects slide on and off the table. Guess the engine doesn't allow for a teleport and always interpolates. Still it encodes the hidden state by testing whether the top is &lt;= 10,000. Nasty but it works. Need to take a shower now...
1504748416

Edited 1504748446
The Aaron
Pro
API Scripter
Yeah, I've used that before. The biggest problem is that doing a select all means you get them as well. Another hack you can take advantage of is writing the source layer in the controlledby field. Anything there that isn't an ID or 'all' will be preserved but not displayed in the GUI, so you could write 'layer:gmlayer' as an "id" then look to it later. Hook 'change:graphic:controlledby' to restore the hidden info if it's removed by manipulation in the GUI, though for tokens that are "hidden", that might not occur.&nbsp; Another hack you could use is setting the width or height to 0, which will cause it to not be visible, but it will remain on the layer at the original position. Will still be drag-selectable though, which could be a problem.&nbsp; Saving Layer, and maybe positional info in the state is a pretty good way to go, indexed on id just as you've mentioned.&nbsp; If you're creating the objects with the API, you could just remove them and store the details of their recreation in the state.
This works for now. Allows you to hide, show and toggle objects by name using a regular expression match. Going to add another version that takes a layer name tomorrow. Then I can hook up some buttons to make it easy to use. Any idea how to find all the objects on the current page I'm working gon? Not the Player's page, my active page. //============================================================================================== // // HideObjects.js (v1.0) // // !HideObjects hide [name] // !HideObjects show [name] // !HideObjects toggle [name] // //============================================================================================== var HideObjects&nbsp;&nbsp; &nbsp;= { &nbsp;&nbsp;&nbsp; SCRIPT_NAME&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;: "HideObjects.js", &nbsp;&nbsp; &nbsp;HIDE_OFFSET&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;: 10000, &nbsp;&nbsp; &nbsp;ISHIDDEN_OFFSET&nbsp;&nbsp; &nbsp;: 1000, &nbsp;&nbsp; &nbsp;CMD_HELP&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;: "!HideObjects help", &nbsp;&nbsp; &nbsp;CMD_HIDE&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;: "!HideObjects hide", &nbsp;&nbsp; &nbsp;CMD_SHOW&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;: "!HideObjects show", &nbsp;&nbsp; &nbsp;CMD_TOGGLE&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;: "!HideObjects toggle", &nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; ChatTemplate&nbsp;&nbsp; &nbsp;: _.template( "/w GM &lt;div style=\"padding:1px 3px; border: 1px solid &lt;%=border%&gt;; background: &lt;%=background%&gt;; color: &lt;%=color%&gt;; font-size: 80%;\"&gt;&lt;%=text%&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;" ), &nbsp;&nbsp; &nbsp;//============================================================================================== &nbsp;&nbsp; &nbsp;//============================================================================================== &nbsp;&nbsp;&nbsp; showHelp : function () &nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sendChat( HideObjects.SCRIPT_NAME, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HideObjects.ChatTemplate( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; border: "#00529B", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; background: "#BDE5F8", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; color: "#00529B", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text: "&lt;b&gt;Help:&lt;/b&gt;&lt;br&gt;" + &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&lt;dl&gt;" + &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&lt;dt&gt;hide [name]&lt;/dt&gt;&lt;dd&gt;Hide all objects matching [name].&lt;/dd&gt;" + &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&lt;dt&gt;show [name]&lt;/dt&gt;&lt;dd&gt;Show all objects matching [name].&lt;/dd&gt;" + &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&lt;dt&gt;toggle [name]&lt;/dt&gt;&lt;dd&gt;Toggle the hidden state of all objects matching [name].&lt;/dd&gt;" + &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&lt;/dl&gt; " + &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "All [name] params can be a regular expression." &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } )); &nbsp;&nbsp;&nbsp; }, &nbsp;&nbsp; &nbsp;//============================================================================================== &nbsp;&nbsp; &nbsp;//============================================================================================== &nbsp;&nbsp; &nbsp;isHidden : function( object ) &nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var&nbsp;&nbsp; &nbsp;top&nbsp;&nbsp; &nbsp;= object.get( "top" ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if ( top &lt;= -HideObjects.ISHIDDEN_OFFSET ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return true; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return false; &nbsp;&nbsp; &nbsp;}, &nbsp;&nbsp; &nbsp;//============================================================================================== &nbsp;&nbsp; &nbsp;//============================================================================================== &nbsp;&nbsp; &nbsp;show : function( object, bShow ) &nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var&nbsp;&nbsp; &nbsp;bHidden&nbsp;&nbsp; &nbsp;= HideObjects.isHidden( object ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var&nbsp;&nbsp; &nbsp;top&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;= object.get( "top" ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if ( bShow == true ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if ( bHidden == true ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;object.set( "top", top + HideObjects.HIDE_OFFSET ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;else &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if ( bHidden == false ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;object.set( "top", top - HideObjects.HIDE_OFFSET ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//log( top + "=&gt;" + object.get( "top" ) ); &nbsp;&nbsp; &nbsp;}, &nbsp;&nbsp; &nbsp;//============================================================================================== &nbsp;&nbsp; &nbsp;//============================================================================================== &nbsp;&nbsp; &nbsp;onShowByRegExp : function( searchString, bShow ) &nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//log( "onShowByRegExp:" ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var pattern = new RegExp( searchString ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var&nbsp;&nbsp; &nbsp;allObjects = getAllObjs(); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for( var index = 0; index &lt; allObjects.length; ++index ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; var object&nbsp;&nbsp; &nbsp;= allObjects[index]; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; var name&nbsp;&nbsp;&nbsp; = object.get( "name" ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if ( pattern.test( name ) == true ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//log( "found: " + name ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;HideObjects.show( object, bShow ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;} &nbsp;&nbsp; &nbsp;}, &nbsp;&nbsp; &nbsp;//============================================================================================== &nbsp;&nbsp; &nbsp;//============================================================================================== &nbsp;&nbsp; &nbsp;onToggleByRegExp : function( searchString ) &nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//log( "onToggleByRegExp:" ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var pattern = new RegExp( searchString ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var&nbsp;&nbsp; &nbsp;allObjects = getAllObjs(); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for( var index = 0; index &lt; allObjects.length; ++index ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; var object&nbsp;&nbsp; &nbsp;= allObjects[index]; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; var name&nbsp;&nbsp;&nbsp; = object.get( "name" ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if ( pattern.test( name ) == true ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//log( "found: " + name ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var&nbsp;&nbsp; &nbsp;bHidden&nbsp;&nbsp; &nbsp;= HideObjects.isHidden( object ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;HideObjects.show( object, bHidden ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;} &nbsp;&nbsp; &nbsp;}, &nbsp;&nbsp; &nbsp;//============================================================================================== &nbsp;&nbsp; &nbsp;//============================================================================================== &nbsp;&nbsp; &nbsp;onApiCommand : function( cmd ) &nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//log( "OnApiCommand: " + cmd ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if ( cmd.startsWith( HideObjects.CMD_HELP ) == true ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; HideObjects.showHelp(); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;else &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if ( cmd.startsWith( HideObjects.CMD_HIDE ) == true ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; HideObjects.onShowByRegExp( cmd.slice( HideObjects.CMD_HIDE.length + 1 ), false ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;else &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if ( cmd.startsWith( HideObjects.CMD_SHOW ) == true ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; HideObjects.onShowByRegExp( cmd.slice( HideObjects.CMD_SHOW.length + 1 ), true ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;else &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if ( cmd.startsWith( HideObjects.CMD_TOGGLE ) == true ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; HideObjects.onToggleByRegExp( cmd.slice( HideObjects.CMD_TOGGLE.length + 1 ) ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;} &nbsp;&nbsp; &nbsp;}, }; //================================================================================================== //================================================================================================== on( "chat:message", function( msg ) { &nbsp;&nbsp; &nbsp;try &nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if ( msg.type == "api" ) &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;HideObjects.onApiCommand( msg.content ); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;} &nbsp;&nbsp; &nbsp;} &nbsp;&nbsp; &nbsp;catch( err ) &nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;sendChat( "*** HideObjects Exception: ", err.message ); &nbsp;&nbsp; &nbsp;} } ); log( "HideObjects COMPILED [" + (new Date()) + "]");
1504752894

Edited 1504753032
The Aaron
Pro
API Scripter
Yup, look at your player object's lastpage property. It will show the last page you loaded while logged in as a GM. The important caveat being it doesn't update when you're logged in as a player and if you load a page in another session, it will be that other page until you load a page again in the current session. You can then filterObjs() for graphics with a matching pageid.&nbsp;