Did you know that you can do things for other users if you’re running an extension? Any method in game.ts
that includes targetId
allows you to supply someone else’s uid, and the action will be performed as them instead. Not every action permits targetId, but here are a few examples:
game.playSound("https://mySoundSource.mp3", 1.0, "targetplayeruidgoeshere")
// this will play a sound for _only_ that user! great for dynamic sound effects
game.enterPortal("https://gather.town/app/mySpaceIdHere", false, "targetplayeruidgoeshere");
// this will prompt a player to go through a portal to a target space! set false to true to **bypass the
prompt**. great for making dynamic load balancing in spaces. you must send a player through a valid gather URL, arbitrary URLs will be rejected.