#M&M Macros #3: Spend Hero Point
1 messages · Page 1 of 1 (latest)
//Spend a Hero Point of Selected by honeybadger and Gazkhan - Jules; compiled by Devioushearts
//Required: Sequencer Module.
//Ensure you have all the file paths updated in order for this to run properly for the files the macro calls for.
// Get all selected tokens
const selectedTokens = canvas.tokens.controlled;
// Loop through each selected token
selectedTokens.forEach( tok => {
// Spend 1 Hero Point
tok.actor.update({'system.heroisme': tok.actor.system.heroisme - 1});
const hpstyle = {
"fill": "blue",
"stroke": "yellow",
"fontFamily": "Arial Black",
"fontSize": 20,
"strokeThickness": 4
}
new Sequence()
.effect()
.atLocation(tok)
.text("HERO POINT SPENT!",hpstyle)
.scaleIn(0, 500)
.fadeOut(6000)
.play()
new Sequence()
.effect()
.atLocation(tok)
.file("/worlds/guardians-midwest/assets/images/Utility/Stars/Star3.webp")
.scale(.15)
.filter("Glow", {distance: 5, outerStrength: 5, innerStrength: 0, color: 0xffffd4, quality: .5, knockout: false})
.fadeIn(2500)
.scaleIn(0, 2500,{ease:"easeOutCubic"})
.loopProperty("sprite", "scale.x", { values: [1, 1.1, 1], duration: 250, ease:"easeOutCubic", delay: 2500})
.loopProperty("sprite", "scale.y", { values: [1, 1.1, 1], duration: 250, ease:"easeOutCubic", delay: 2500})
.duration(4000)
.waitUntilFinished()
.effect()
.atLocation(tok)
.file("/worlds/guardians-midwest/assets/images/Utility/Stars/Star3.webp")
.scale(.15)
.filter("Glow", {distance: 5, outerStrength: 5, innerStrength: 0, color: 0xffffd4, quality: .5, knockout: false})
.animateProperty("sprite", "position.y", { from: 0, to: -250, duration: 500})
.scaleOut(0, 2500, {ease:"easeInOutSine"})
.rotateOut(1800, 2500, {ease:"easeOutSine"})
.fadeOut(2500, { delay: 0 })
.play();
});```
Here is the graphics file. This I created myself and give you permission to use it for this macro free, no worries. You will need to establish your file path. I might place a sound in the macro for later but I have not as of yet.