Do you wish to spring an explosive trap on your players,? of course you do. For this tutorial you need the following modules:
- Monks Active Tiles
- Sequencer
- JB2A -- Animations
First we need an actor that can perform the trap attack. Create a new NPC, name it traps and give it a fitting icon. The NPC also needs to have an attack action, call this action "Explosion"
Next head over to freesound and download a suitable sound file for the explosion. In the macro below, we need the file to be placed under "media/156031__iwiploppenisse__explosion.mp3", replace this with your selection of sound.
Click the token-bar or create a new macro from the macro menu. Call this macro "Explode At Tokens". It should contain this:
let targets = arguments[0].tokens;
let sequence = new Sequence()
for(let target of targets){
sequence.effect()
.atLocation(target)
.file("jb2a.explosion.01.orange")
.sound("media/156031__iwiploppenisse__explosion.mp3")
;
}
Make sure you remember set its Type over to script
Create a tile that spans the entire area where the trap should be triggered. In my case I used a fitting image spanning only one grid-cell. Remember to hide this image, so that your players can't easily see the trap.
Double click the tile to bring up its configuration, and move over to the "Triggers" tab.
- Set the tile to trigger "On Enter"
- Add the "Run Macro" action, and set it to run the macro we created in step 2.
- Add the "Attack" action, select our Trap actor, and the "Explosion" attack.
And, thats all.