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

[Bug?] sendPing only working sporadicly?

1494099305

Edited 1494102422
WurmD
KS Backer
Hello all, I've written a command to move all my players to a specific location whenever I type in chat "!move" case '!move': sendPing(500, 500, Campaign().get('playerpageid'), null, true); sendChat('','Pinging and moving all players.'); break; and while I always see the 'Pinging and moving all players.', only rarely do I see the ping and the moving of players. There seems to be some kind of hidden timeout, where the first time I attempt "!move" it works, but then only after a while does it work again. Is this reproducible in your machines? Is this a known bug? Cheers!  
1494109579
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Unless it was fixed at some point, sendPing will not move your players.
1494129654

Edited 1494132538
WurmD
KS Backer
Well, when it works, it moves the players XD (at least my one test player I have logged on in another account) Huh, perhaps I imagined it, it's not moving them now
1494129950
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
huh, then I guess I'll have to play around with it since it seems to have been at least partly fixed
1494132562

Edited 1494132580
WurmD
KS Backer
Huh, perhaps I imagined it, it's not moving them now
I'm about to post in the Bug forum. The following post, is that appropriate? sendPing only moves GM view and only shows the ping to the GM sendPing only moving GM view and showing ping to GM sporadically My original post in API forum: <a href="https://app.roll20.net/forum/post/5012487/bug-send" rel="nofollow">https://app.roll20.net/forum/post/5012487/bug-send</a>... This is apparently a known issue:[Bug] sendPing only pinging and moving view of GM: <a href="https://app.roll20.net/forum/post/987974/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/987974/slug%7D</a> but perhaps it was forgotten. So creating this post here.
1494166690
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Sounds fine to me.
1494169705
The Aaron
Pro
API Scripter
Though I will note that it would be nice to retain the existing functionality. &nbsp;Ideally, it would be nice to be able to specify a list of player ids that get the ping and get dragged to the ping location.
1494169830
The Aaron
Pro
API Scripter
You can piggy back another bug on that one with sendPing(), which is that it won't ping the same location twice without another location being pinged in between. &nbsp;I solve this in TurnMarker1 by wrapping the sendPing() function in a function that caches and checks the last ping location, and sends a bogus ping before issuing the new ping, if they were the same: &nbsp; &nbsp; fixedSendPing = (function(){ &nbsp; &nbsp; &nbsp; &nbsp; var last={}; &nbsp; &nbsp; &nbsp; &nbsp; return function(left,top,pageid,playerid,pull){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if( last.left &nbsp; === left &nbsp; && &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; last.top &nbsp; &nbsp;=== top &nbsp; &nbsp;&& &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; last.pageid === pageid ) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sendPing(-100,-100,pageid,null,false); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sendPing(left,top,pageid,playerid,pull); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; last.left=left; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; last.top=top; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; last.pageid=pageid; &nbsp; &nbsp; &nbsp; &nbsp; }; &nbsp; &nbsp; }()),