javieros105 / FVTT-TokenHUDWildcard

Module for FoundryVTT that expands functionality to Token HUD and Wildcard Images
GNU General Public License v3.0
13 stars 4 forks source link

Feature - Swap token when attacking #29

Open arcanjl opened 2 years ago

arcanjl commented 2 years ago

Is it possible to swap the token for an attack, then back? I found a macro, but it does not work.

javieros105 commented 2 years ago

mmmmm, I don't see the use of it. What would be the use case? Because if you change the token for an attack the attack is mostly instantaneous so when would the change back be?

arcanjl commented 2 years ago

Thank you for your help. I figured it out with the help of some people on Discord. But if you were curious of why? https://youtu.be/i2s_Dp-dFZo

javieros105 commented 2 years ago

OHhhhhh ok, I get it. Maybe instead of including it as part of the module itself, it could be collection of macros included in the module that use a similar system of setting token size but with attack token. For example if you have a token called VampireHumanForm.png and VampireHumanForm-attack.png then the macro will automatically use the attack token because it exists and use a default delay time, or even we could use attack1000 where 1000 would be the number of milliseconds.

I'll ponder about it for a bit and see if it's worth it

arcanjl commented 2 years ago

I can send you the macro if you want it. :)

javieros105 commented 2 years ago

Sure, send it away, gonna be good to have it as base!

arcanjl commented 2 years ago

This only works with Midi-QOL Also, this was fixed/ revamped by Flix on Discord. He is awesome.

`let tok= canvas.tokens.get(args[args.length-1].tokenId) await tok.document.update({img: "tokenizer/npc-images/009_skeleton_henchman_6-attack_top.webm"})

setTimeout(() =>{ tok.document.update({img: "tokenizer/npc-images/009_Skeleton_Henchman_6-Idle_Top.webm"}) }, 3500);`