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

Summoned creature spawn position

I have a script (below) which allows a wizard to summon a wolf, it is working ok except that the summoned wolf token is appearing on top the wizard, I'd like it to be offset one grid  (The Fantasy Trip character sheet with hex grid if it matters).  Also can't seem to get the script to update the Fatigue attribute on the character sheet. Any help gratefully received !script{{ --#title|Wavis attempts to summon a wolf --#limitmaxbarvalues|1 --&WavisToken|@{selected|token_id} --=WavisDX|@{selected|dx} --+|Dexterity: [$WavisDX] --/| Need to increase fatigue value here --!t:@{selected|token_id}|Fatigue:+=1 --/| This doesn't update Fatigue attribute for some reason --=Roll|3d6 --+|Wavis gestures mystically and rolls [$Roll] --?[$Roll] -le [$WavisDX]|[ --vtoken|@{selected|token_id} burst-magic --@forselected|Spawn _name|Wolf --offset| -1,0  _layer|token --]|[ --+|A faint bark is heard --]| }}
Hey Norman, So the Fatigue line you have: --!t:@{selected|token_id}|Fatigue:+=1 That is using object modification of a token, which would look to update a Token property named Fatigue, which there isn't a token property by that name. If you are wanting to update an attribute for a character, the syntax is: --!a:@{selected|character_id}|Fatigue:+=1 --!a is for attributes. If you had Fatigue linked to one of a token's bars, then you could use --!t to update the bar value. For example if Fatigue was linked to a token's bar 3. The syntax would be: --!t:@{selected|token_id}|bar3_value:+=1
1725140340
David M.
Pro
API Scripter
In your forselected Spawn line, you left in double dash ( -- ) when it should be replaced with underscore ( _ ) like the other parameters. The scriptcards parser is eating up the double dash.
Awesome, thank you both for your help it's now working perfectly, my tiny brain is slowly getting to grips with scriptcards :)