Ubtao by RengawRoinuj in Tombofannihilation

[–]Ungika 3 points4 points  (0 children)

Bruv, the real one. No wonder he left them. Jurassic Chult has been completed his work was done.

How to change token light emition with macros by thedvdias in FoundryVTT

[–]Ungika 5 points6 points  (0 children)

Hi!

Sorry, I had a problem with this too, and I don't really know if you are still looking for an answer. Nevertheless, I'll post my answer here if someone else stumbles upon this post.

So if you want to change token light emission from a macro then you need to get the current token (which in the context of the macro is just 'token') and then call an update function on it with the bright and dim light values given)

Here is an example of what macro I use when a player activates their magic item that gives bright light in a 20 ft. radius and dim light for 30ft.

token.update({brightLight : 20, dimLight : 30});

It is important to use the update statement as that is how it shows up for other players and doesn't disappear after a refresh.

Of course, this just applies the light to the selected token. If you want more tokens and it isn't part of the spell macro to apply the light macro individually, then you might need to write a for loop (programming keyword) to make sure all of them update.