Created
January 26, 2024 22:02
-
-
Save Sevaarcen/821fc856790ad22a794eb75f8f4882b3 to your computer and use it in GitHub Desktop.
FoundryVTT - Target Selected Tokens (Universal)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// unset all current targets | |
for (const t of game.user.targets) { | |
t.setTarget(false, {user: game.user, releaseOthers: false, groupSelection: false}) | |
} | |
// Set all controlled tokens to be targeted | |
for (const controlled of canvas.tokens.controlled) { | |
controlled.setTarget(true, {user: game.user, releaseOthers: false, groupSelection: false}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment