Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Swap token when attacking #29

Open
arcanjl opened this issue Mar 25, 2022 · 6 comments
Open

Feature - Swap token when attacking #29

arcanjl opened this issue Mar 25, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@arcanjl
Copy link

arcanjl commented Mar 25, 2022

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

@javieros105
Copy link
Owner

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
Copy link
Author

arcanjl commented Mar 31, 2022

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
Copy link
Owner

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

@javieros105 javieros105 added the enhancement New feature or request label Apr 1, 2022
@arcanjl
Copy link
Author

arcanjl commented Apr 1, 2022

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

@javieros105
Copy link
Owner

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

@arcanjl
Copy link
Author

arcanjl commented Apr 4, 2022

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);`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants