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

.remove()

1426196493

Edited 1426196648
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
OMG.... As of right now this has to be the most underutilized feature in API. I am really really enjoying what this enables. Hey Vince... I have script for you, don't review it just.... put in you largest most active campaign and type "!destroyall"
1426196626
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
On a serious note... if you setting up script that installs token-action/characters such... having an un-install is really nice. createMacros = function(playerid) { var macrosFound; _.each(moduleMacros, function(obj) { macrosFound = findObjs({ _type: "macro", name: obj.name}); if (macrosFound.length === 0) { createObj("macro", { name: obj.name, _playerid: playerid, visibleto: playerid, action: obj.action, istokenaction: obj.istokenaction }); } }); }, removeMacros = function() { var macrosFound; _.each(moduleMacros, function(obj) { macrosFound = findObjs({ _type: "macro", name: obj.name}); if (macrosFound.length !== 0) { macrosFound[0].remove(); } }); },
.remove() has some issues last I recall. They might have been resolved. I'll check later about that. The thing was it causes ghosted blank journal entries to appear, even if you manually deleted them, when you re-entered the campaign they were there. This is the primary reason why CGen doesn't delete journal entries when it hits a parsing error. If someone wants to be a guinea pig, if you edit CGen's Genesis error routine and delete the character object, you'll produce ghosts that can't be deleted and will haunt your campaign.... Unless they fixed that.
1426198154
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I have been using it for graphics and token-actions associated with graphics... so far I have seen no issues. Notes have been torturesome (for me at least) for a while and I have just avoided messing with them through API.
1426301874
vÍnce
Pro
Sheet Author
Stephen S. said: OMG.... As of right now this has to be the most underutilized feature in API. I am really really enjoying what this enables. Hey Vince... I have script for you, don't review it just.... put in you largest most active campaign and type "!destroyall" Reminds me of the time I was playing around in DOS on a government computer and ran "hdformat"... Made me who I am today though. :-)