League-of-Foundry-Developers / fvtt-module-trigger-happy

Trigger Happy! FVTT Triggering system
Creative Commons Attribution 4.0 International
28 stars 12 forks source link

[BUG] #74

Closed Verodox closed 2 years ago

Verodox commented 2 years ago

Module Version: v0.8.21

Describe the bug The @Trigger[click] doesn't work for some reason

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Browser: Trigger Happy error

Foundry Version: 0.8.9

Game System: Dnd5e

Additional context I've installed Trigger Happy and NPC Chat and I'm trying to replicate what this video (https://www.youtube.com/watch?v=W6z0pMUBAz8) did.

p4535992 commented 2 years ago

Have you activated the module 'NPC Chatter' ?

I try that tutorial and it' seem to work to me.

Here the trigger i put on the journal:

@Token[Catharina Combat]@Trigger[Click]@Macro[eD2rpXMTXTuo7Bh2]{Catharina Merchant Chatter}

and here the macro with name 'Catharina Merchant Chatter' (you can do a better macro it' just a example):

var NAME = "Catharina Combat";
var token = game.scenes.filter(x => x.active)[0].data.tokens.filter(x => {
// console.error(x.name);
if(x.name.toLowerCase().includes(NAME.toLowerCase().trim())){
  return x;
}
})[0];
// console.log(token.name);
game.npcChatter.tokenChatter(token);

remember to create a rolltable with name 'Catharina Combat'