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 here.
×
×
Cookie Preferences
We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
Play Now
Join a Game
Characters
Shop
Tools
Compendium
Community
Sign In
Question on Macro template, How can I use the NPC name for my template
i have this part of a template and I would like to take the names of my NPC if possible. on the field NAME &{template:npcaction} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{name=?{name}}} Thank you for your support in advance
If you have a token owned by the character selected, you can use @{selected|character_name}. If you want to get a popup to select a character you can use @{target|character_name}.
If you ever use tokens that don't represent a character sheet for some reason (or multiple tokens with different names that all represent a single character sheet), you could use token_name in place of character_name.
Thank you both. both had really helpful and both solutions worked for what i was looking for Where did you learn? i wish to learn more and improve my scripts more and more
mainly here on the forums, and the wiki. The wiki does have a lot of basic information that everyone should read. For non-roll20 specific stuff, like javascript and html, just googling and again, here on the forums.