Trigger Happy (Teleportation Tutorial)

Hello! There was an error in my old macro (made in 0.6 or something).

Here is a new version that should fix your Issues:

let table = game.tables.entities.find(t => t.name === 'Room Table');
await table.roll().then(result => {
   const results = result.results[0].data.text;
   DAE.teleportToToken(token, results, 0, 0)
})

Foundry changed quite a bit since then :wink:

1 Like

Worked like a charm! Thank you again!!!

Hi Kevin, thank you for the tutorial. I am wondering did you ever find a solution to Christopher_Marshall’s problem with duplicating tokens back in 2020 or 2021? I am getting duplicate tokens in Foundry v9 with current DAE and Trigger Happy. The stairway tutorial is straight-forward so hard to imagine what’s wrong, but here’s the journal entry and macro in case it jogs anything in your memory. This all works, but I wind up with 2 tokens, one at the origin and one at the destination. There’s a stairway and a ladder in this example, both triggers work as written here, with the duplicating token issue.

Lonely Tower

First and Second Floor Stairs
@Token[Stairs1] @Trigger[capture move] @ChatMessage[/TeleportToToken Stairs2 0 0]
@Token[Stairs2] @Trigger[capture move] @ChatMessage[/TeleportToToken Stairs1 0 0]

Basement and First Floor Ladder
@Token[Basement] @Trigger[click] @ChatMessage[/TeleportToToken FirstFloor 0 0]
@Token[FirstFloor] @Trigger[click] @ChatMessage[/TeleportToToken Basement 0 0]

Here is the Macro:
DAE.teleportToToken(token, args[0], args[1], args[2])

Seems like it should work without duplicates, but while testing I wound up with a dozen copies of the actor token I was moving through the stairs and/or clicking on the ladder…but I don’t seem to get the DAE teleport function to work without leaving a duplicate Actor token behind.

:wave: Heya, I’ve taken a look at it, and it is probably related to the new update in v9, and DAE, I’ll have a quick talk with tposney to see if there is anything we can do.

Alright, spoken to Tposney and he is going to put out a new update that fixes the issue! Thank you for bringing it up!

Is there a way to let an abillity trigger the teleport?

I think what you would want to look for is Item Macros in that case, but you would need another macro addition to make it work, to select the token somehow.