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

Help with code

I am tying to call a trying to call upon an ability form another ability on a target&nbsp; /w gm [EFFECT](~selected|Hail-of-Thorns-Effect @{target|target_id}) but it doesnt work if i use this&nbsp; /w gm [EFFECT](~selected|Hail-of-Thorns-Effect)&nbsp; then i cant choose a target to activate the ability upon except the casting character. Is there a way to use the call ability and actually choose a foe and cast the effect upon from an existing ability on the caster? This is what the ability looks like": &amp;{template:npcaction} {{rname=**Level 1: Hail of Thorns** [Hail-of-Thorns](<a href="https://s3.amazonaws.com/files.d20.io/images/317939119/lyGGjwPOHuH6Ir5glKPs4Q/original.png" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/317939119/lyGGjwPOHuH6Ir5glKPs4Q/original.png</a>) "Nature infuse and death do spawn, rain down on my foes a hail of thorns,"Tempestas di Spinas"}} /w gm **The next time you hit a creature with a ranged weapon attack before the spell ends, this spell creates a rain of thorns that sprouts from your ranged weapon or ammunition. In addition to the normal effect of the attack, the target of the attack and each creature within 5 feet of it must make a Dexterity saving throw. A creature takes 1d10 piercing damage on a failed save, or half as much damage on a successful one.** /w gm **Hit EFFECT on target creature.** /w gm [EFFECT](~selected|Hail-of-Thorns-Effect @{target|target_id}) !token-mod --ids @{selected|token_id} --set statusmarkers|+HailofThorns|+Concentration&nbsp; !act -1 10 --Hail of Thorns which leads into this once the foe is targeted: /w gm **Hit Damage on creature and all creatures within 5 feet of it.** !Spawn{{ &nbsp; --name|Hail of Thorns &nbsp; --fx|explode-acid &nbsp; --offset|0,0 &nbsp; --qty|1 &nbsp; --size| 3,3 &nbsp; --order|tofront &nbsp; --layer|map &nbsp; --force|yes &nbsp; --expand|10,50 &nbsp; --deleteTarget|false }} !splay Mind Control Psi by Daniele Galante Any help would be appreciated&nbsp;
1673725790
timmaugh
Forum Champion
API Scripter
I'm having trouble deciphering what you want to do... because it looks like you're showing us what the Hail-of-Thorns-Effect ability looks like, except that what you show us also includes the attempt at the button text that... would... call... Hail of Thorns? I'm not sure what I'm looking at, there. And then, in what I understand to be the Hail-of-Thorns-Effect ability, I don't see the targeted token id ever used... so what did you need it for? As for why your formation isn't working, including the targeting statement where you are (in the button syntax) isn't a way to pass command line parameters.&nbsp; The target statement is going to resolve at the top level/initial processing of your message, so that what Roll20 will try to do is find an ability named "Hail-of-Thorns-Effect -M1234567890abcdef" on the selected token. That obviously won't work. The processing of the initial message (that would create the button) would allow you to choose the *source* of the ability, as if everyone had a Hail-of-Thorns-Effect ability: [Hail](~@{target|token_name}|Hail-of-Thorns-Effect) ...but it will not "pass" information into the referenced ability. However, your referenced ability can have a targeting statement, since clicking the button dispatches a user-generated message the same as typing in the chat. You will get the chance to click on a token. So if you need the target token id for the Spawn command (for instance), include it there. But if you can clarify what what the text of the Hail-of-Thorns-Effect ability is and what you need the target id for (not in game terms, but which of the script commands will need to make use of it), I can be more specific.
What im trying to do is this&nbsp; /w gm [EFFECT](~selected|Hail-of-Thorns-Effect @{target|target_id}) When a player chooses a target creature lets say an orc, then they can click on the button (EFFECT) in chat and then these things happen to the orc automatically (Spawn and sound effect) (these effects are placed in the separate ability&nbsp; Hail-of-Thorns-Effect) If this makes sense !Spawn{{ &nbsp; --name|Hail of Thorns &nbsp; --fx|explode-acid &nbsp; --offset|0,0 &nbsp; --qty|1 &nbsp; --size| 3,3 &nbsp; --order|tofront &nbsp; --layer|map &nbsp; --force|yes &nbsp; --expand|10,50 &nbsp; --deleteTarget|false }} !splay Mind Control Psi by Daniele Galante
I realize this is the standard call within a button [EFFECT](~selected|Hail-of-Thorns-Effect) but im what trying to do is have the player click on an orc and then this EFFECT button (and not separate buttons for each thing kinda like one button does all if its placed as a linked ability) and have the fireworks go off automatically. Im currently running a game for kids and trying to add a little more craziness to the game for them.
Ok let me expalin it a differant way a character that has has an ability that is an attack ability wants to use the ability on a character does not have it. For Hail of Thorns on a character clicks or chooses a foe and then clicks on Hail of Thorns button with effects in it, but the foe doesnt have this ability so the system kicks out an error saying it cannot locate the ability on foe.&nbsp; How do i get the ability to work on the foe even though the foe doesnt have that ability. Or in other words can a player with the ability simply click a foe and fire the ability with a single button linked from another ability? So in my spell above, they click the spell Hail of Thorns which brings up a button with info about the spell they click on the foe in game and then the button in chat that fires off the fireworks (spawn and sound)&nbsp; I cant get the button (called effects) to fire off on the foe but it will fire off on the caster if the caster is chosen
I tried this copy and paste [Hail](~@{target|token_name}|Hail-of-Thorns-Effect) and i get this message No ability was found for %{Orc|Hail-of-Thorns-Effect}
Maybe this help&nbsp; I want the Hail of Thorns spell to create a button to provide fireworks when the button is pushed call Hail of Thorns Effects by clicking on an orc for example and then hit the button.&nbsp;
I got the button to work the way i wanted thanks for this bit of info [Hail](~@{target|token_name}|Hail-of-Thorns-Effect)&nbsp;