Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Talk:Script:Move Lighting"

From Roll20 Wiki

Jump to: navigation, search
(Created page with "{{script overview |name=Move Lighting |author={{user profile|3173313|Kastion}} |version=0.1.4 |lastmodified=2018-05-02 |code=MoveLighting}} '''NOTE: THIS SCRIPT IS NOT YET AV...")
 
(Blanked the page)
Line 1: Line 1:
{{script overview
 
|name=Move Lighting
 
|author={{user profile|3173313|Kastion}}
 
|version=0.1.4
 
|lastmodified=2018-05-02
 
|code=MoveLighting}}
 
  
'''NOTE: THIS SCRIPT IS NOT YET AVAILABLE AND IS AWAITING PULL REQUEST AUTHENTICATION ON GITHUB - ETA TO AVAILABILITY = 1 to 2 WEEKS'''
 
 
This script lets you quickly move a dynamic lighting polygon path object from one game layer to another game layer.
 
 
== Syntax ==
 
{{syntaxbox top|Example|nocat=true}}
 
{{API command|movelight}}<br>
 
{{API command|movelight <map,objects,gmlayer,walls> <id>}}<br>
 
{{syntaxbox end}}
 
 
== Installation and Configuration ==
 
'''MoveLighting''' ''currently isn't available as a one click install option and must be installed manually.''
 
 
You can copy the script's code, available from the menu on the right and stored at Roll20's [https://github.com/Roll20/roll20-api-scripts API GitHub Repository]. Paste the code into a new script in your campaign's [[API:Use_Guide#The_Script_Editor|API Script Editor]]. Save the new script and it will be available inside your campaign.
 
 
== Script Use ==
 
To use simply type !movelight [layer] [object ID] into the chat. <br />
 
<br />
 
'''Valid Layers:'''<br />
 
map<br />
 
objects<br />
 
gmlayer<br />
 
walls<br />
 
<br />
 
'''Example of running the command:'''<br />
 
Move dynamic lighting polygon object from lighting layer to GM Layer:<br />
 
!movelight gmlayer -L9XSOq-voBH6SR73hpH<br />
 
<br />
 
Move dynamic lighting polygon object from GM layer back to lighting layer (this will restore path obstruction and line of sight etc. etc.)<br/>
 
!movelight walls -L9XSOq-voBH6SR73hpH<br />
 
<br />
 
This script was built for its synergy with the script TokenMod. Here is an example of using the two scripts together to open / close doors on a map.<br />
 
Get the ID of the dynamic lighting polygon object obstructing path and line of sight through the door and store it in bar1 of the door token graphic. Then you can create the following two macros:<br /><br />
 
'''Open Door'''<br />
 
!movelight gmlayer @{selected|bar1}<br />
 
!token-mod --set layer|gmlayer --ids @{selected|token_id}<br />
 
<br />
 
'''Close Door'''<br />
 
!movelight walls @{selected|bar1}<br />
 
!token-mod --set layer|objects --ids @{selected|token_id}<br />
 
<br />
 
Then to use these macros, have the door on the object layer, select the door, and run the '''Open Door''' macro. Then move to the GM Layer, select the door, and run the '''Close Door''' macro.
 
 
== Changelog ==
 
{{changelog version|0.1.4|2018-05-02|* Initial release}}
 

Revision as of 04:13, 5 May 2018