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 "Script:Animation"

From Roll20 Wiki

Jump to: navigation, search
m (redirect to Script Index, API no longer available)
m (suppress category)
 
Line 2: Line 2:
 
<!-- Don't delete redirect, help center links to this page even though API have been removed -->
 
<!-- Don't delete redirect, help center links to this page even though API have been removed -->
  
{{script overview
+
Creator: {{user profile|503018|manveti}}
|name=Animation
+
|author={{user profile|503018|manveti}}
+
|version=0.4
+
|lastmodified=2015-06-26}}
+
  
 
'''Animation''' allows the user to define and run animations consisting of images from a Roll20 user library.  Each frame's duration, position, and orientation can be set independently of the other frames, as can aura and light properties.
 
'''Animation''' allows the user to define and run animations consisting of images from a Roll20 user library.  Each frame's duration, position, and orientation can be set independently of the other frames, as can aura and light properties.
Line 14: Line 10:
  
 
=== Syntax ===
 
=== Syntax ===
 +
<!-- suppress category
 +
 
{{syntaxbox top|anim|formal=true}}
 
{{syntaxbox top|anim|formal=true}}
 
{{API command|anim}} help {{API parameter|name=command|optional=true}}<br>
 
{{API command|anim}} help {{API parameter|name=command|optional=true}}<br>
Line 117: Line 115:
 
::If no page is specified, the page containing the target token will be used.  If no target is specified, the page with the player ribbon will be used.}}
 
::If no page is specified, the page containing the target token will be used.  If no target is specified, the page with the player ribbon will be used.}}
 
{{param description bottom}}
 
{{param description bottom}}
 +
 +
-->
  
 
=== Examples ===
 
=== Examples ===
Line 161: Line 161:
 
{{changelog version|0.1|2015-06-16|* Initial release}}
 
{{changelog version|0.1|2015-06-16|* Initial release}}
  
[[Category:Discontinued API Scripts]]
+
<!-- [[Category:Discontinued API Scripts]] -->

Latest revision as of 19:43, 20 September 2021

  1. RedirectAPI:Script Index

Creator: manveti

Animation allows the user to define and run animations consisting of images from a Roll20 user library. Each frame's duration, position, and orientation can be set independently of the other frames, as can aura and light properties.

It is recommended that this script be used in conjunction with the CommandShell module, which will improve output formatting and command discovery.


[edit] Syntax

[edit] Examples

!anim add image HighDensityFire
With a token selected, will name the token's image "HighDensityFire" for later reference.
!anim add animation Fireball
Will create an empty animation named "Fireball"
!anim add frame Fireball HighDensityFire 50 -w 35 -h 35 --light 10 -dim 5
Will create a 35x35 (half-square) frame using the "HighDensityFire" image. The frame will last for 50ms (1/20th of a second), and will emit 5 feet (1 square) of bright light and 5 further feet of dim light.
!anim add frame Fireball --copy 0 --rotation 10 -w 70 -h 70 -l 20 -d 10
Will create a 70x70 (full-square) frame using the first frame as a template. The new frame will be rotated 10 degrees clockwise, and will have both its size and light radius doubled.
!anim add frame Fireball -C -1 -I MidDensityFire -r 20 -w 140 -h 140 -l 40 -d 20
Will create another, larger frame, using the second frame as a template. This one will use a different image, will be rotated a further 10 degrees clockwise, and will have both its size and light radius doubled again.
!anim edit frame Fireball 2 -I HighDensityFire
If we decide the third frame was too early to switch to the "MidDensityFire" image, this command will change its image to "HighDensityFire".
!anim edit HighDensityFire http://...
Will change the "HighDensityFire" image to the new image. Note that this will not affect existing frames using the "HighDensityFire" image; they will continue to use whatever that name pointed at when they were defined.
!anim remove frame Fireball 17
Remove the 18th frame of the "Fireball" animation.
!anim list image
Will whisper a list of currently defined images, in alphabetical order, to the user who executed the command.
!anim list image HighDensityFire
Will whisper the URL of "HighDensityFire" to the user who executed the command, displaying the image in the whisper.
!anim list animation
Will whisper a list of currently defined animations, in alphabetical order, to the user who executed the command.
!anim list animation Spinner
Will whisper information about the specified animation to the user who executed the command.
!anim list frame Fireball
Will whisper a list of frames in the "Fireball" animation to the user who executed the command.
!anim list frame Fireball 0
Will whisper all the properties of the first frame of "Fireball" to the user who executed the command
!anim run Fireball
With a token selected, will run the "Fireball" animation centered on the selected token.
!anim run Fireball -f 5 -x 500 -y 350 --xscale 2 --yscale 2
Will run the "Fireball" animation centered at (500,350), doubled in size and running in slow-motion (taking five times as long to run).
!anim run Fireball -T @{target|token_id}
Will run the "Fireball" animation centered on the targeted token.

[edit] Changelog

v0.4 (2015-06-26)

  • Added ability to center animation on a token given by ID.


v0.3 (2015-06-22)

  • Added export commands.


v0.2 (2015-06-19)

  • Added rename and copy commands. Added output for all commands.


v0.1 (2015-06-16)

  • Initial release