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 .
×

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
1599985340
GiGs
Pro
Sheet Author
API Scripter
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}.
1600008484
Kraynic
Pro
Sheet Author
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
1600067967

Edited 1600068011
GiGs
Pro
Sheet Author
API Scripter
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.