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

Does Alterbar not work with OnMyTurn api?

Well, to be precise, Alterbar that is called with Powercard. My situation here is: I want to make an encounter where on each of the player's turn, their bar3 tick up by 1 to a maximum of 10. and when it ticks to full, something happened. I want to use Alterbar instead of token-mod because I don't want the gauge to exceed the maximum value that the bar can go. I'm using the The Aaron's&nbsp; OnMyTurn &nbsp;script to run the powercard macro at the start of each turn. Every other function of the macro works fine except the Alterbar line where it suppose to +1 to bar3 value. This is the macro I wrote, This is called every start of the turn to by the OnMyTurn script: !power {{ --name|@{selected|character_name}'s Turn --Effect| --!Tag*1|[x](<a href="https://s3.amazonaws.com/files.d20.io/images/169199653/nGKsq1nqNNjSxepCW68a6Q/max.png" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/169199653/nGKsq1nqNNjSxepCW68a6Q/max.png</a>) @{selected|character_name} regains her bonus action! --!Tag*2|[Y](<a href="https://s3.amazonaws.com/files.d20.io/images/169199806/rtVvp7VwR3--JpPD0ERTFw/max.png" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/169199806/rtVvp7VwR3--JpPD0ERTFw/max.png</a>) @{selected|character_name} regains her reaction! --soundfx *1|_audio,play,nomenu|Cursor_Move --api_token-mod*1|_ids @{selected|character_id} _set statusmarkers|-brown|-green|-blue|-interdiction|-stopwatch|-bolt-shield|-Shield|-Reverse|-Run|-AtkUp|?half-haze:+1|?Cast:+1|?Burn:+1 tint_color|transparent --alterbar1|_target|@{selected|token_id} _bar|3 _amount|+1 _show|none }} I also try using Alterbar outside of Powercard, but it doesn't work also.
1604640531
The Aaron
Roll20 Production Team
API Scripter
Calling a script from a script can be weird. Alternate may not work correctly in that context. If you've want to try it with TokenMod, you can use ! to restrict it to the Max value: !token-mod --set bar3_value|+1!
1604640789
Oosh
Sheet Author
API Scripter
Should it be either --alterbar or --alterbar*1 ?? I haven't really played with Powercards, but it looks like the tag is missing the *.... or does the 1 do something else? But using TokenMod is probably better anyway, since it's already doing other stuff.
1604643001

Edited 1604643072
Switch to TokenMod, works like a charm now. Thank you for the swift reply! Alterbar1 is working for me, but yeah, I think it should be *1 the 1 came from when I first start learning about powercard so I was copying the Macro from Nick Olivo's YouTube Channel and he use it there