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

SpawnFX command doing seemingly nothing

Hi y'all, I really didn't want to post this question, because I'm almost 100% sure this problem is entirely caused by my own stupidity, but I can't for the life of me figure out why SpawnFX isn't seeming to actually spawn any fx. Here's some examples of how I'm using the commands: spawnFx(target.get('left'), target.get('top'), 'burst-fire',getObj('page', Campaign().get('playerpageid'))); spawnFxBetweenPoints({x:(x+xMod), y:(y+yMod)},{x:(x+xMod+xMod), y:(y+yMod+yMod)},"breath-fire",getObj('page', Campaign().get('playerpageid'))); Log statements both before and after spawnFx commands run successfully, I don't get any errors, and none of these objects seem to be undefined or doing anything weird. Any idea what might be up?
1500046101
The Aaron
Pro
API Scripter
Try: spawnFx(target.get('left'), target.get('top'), 'burst-fire',Campaign().get('playerpageid')); spawnFxBetweenPoints({x:(x+xMod), y:(y+yMod)},{x:(x+xMod+xMod), y:(y+yMod+yMod)},"breath-fire",Campaign().get('playerpageid')); the final argument is the page id, not the page object.  Actually, reading the documentation, you can omit it to get the current player page, so these would be equivalent: spawnFx(target.get('left'), target.get('top'), 'burst-fire'); spawnFxBetweenPoints({x:(x+xMod), y:(y+yMod)},{x:(x+xMod+xMod), y:(y+yMod+yMod)},"breath-fire"); If that doesn't work, try logging each of the parameters to see if there is something unexpected: log({ left: target.get('left'), top: target.get('top') }); log({ start: {x:(x+xMod), y:(y+yMod)}, end: {x:(x+xMod+xMod), y:(y+yMod+yMod)} });