Sockets not emitting
Hey all, I'm losing my mind. I recently stopped using socketlib in my convenient effects rewrite, and now I can't get sockets to emit at all. My setup is basically copying how pf2e did it, so I'm a bit confused. And yes,
socket: true
is set in the manifest.
Here's my code (again, mostly derived from pf2e):
Basically I'm never seeing the log come through from the on
call5 Replies
Where are you checking the socket.on? The same client instance?
Solution
Clients don't hear their own socket emissions
Ohhhh. 😵💫 yeah, that was it. So basically... I also need to execute the function locally? I'm now seeing how this worked in socketlib
Essentially, it needs to execute as the GM, but the issue was if the GM was the one triggering it. So I should so some check there first to see if I need to emit it at all I guess
Foundry VTT Community Wiki
Sockets
API documentation for the Socket functionality available to packages.
Alright, so basically I wrote this
For now anyway, probably could use some refactoring but it works. Thanks for the help!