Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

New Reaction Live for Subscribers: Send to Chat

Same here: Send to Chat happens only if you move the token with your mouse, not with the arrow keys. Makes setting up traps with this pretty useless, if the players can just fly over them unnoticed by using the keyboard! Game Master said: I can't get the reaction/traps to work with keyboard movement, only with mouse dragging.
Is there a way to have it trigger if a player has a high Passive Perception? Like set it up to trigger when a token player passes over it but only if that player's Passive Perception is 15 or higher? Is there a way for it to check the player's sheet for their Passive Perception?
1765137141

Edited 1765137167
Do you use ScriptCards?  I'd say a script that uses --#sourceToken|@{selected|token_id} to set the source, then check the source token using [*S...] for it's Passive Perception and then using a conditional to either End Script if PP below DC or send a message using --+| Whatever if above DC
1765137722

Edited 1765300818
Here's something I knocked together, my first draft happened to work because of the NPC passive wis being low - this now checks, so if the players also have a NPC they control, just set the perception score appropriately and it will work - it won't pick up a Passive Perception 14 or similar under Senses on the NPC character sheet as that's not a numerical field.  Works straight out of the box for PCs !script{{ --#hideCard|1 --#emoteState|0 --#sourceToken|@{selected|token_id} --? [*S:npc] -eq 1|NPC --&PP|[*S:passive_wisdom] --:Check| --?[&PP] -ge 12|Message|End --:X| --:NPC| --&Mod|[*S:npc_perception] --=NPCPer|10 + [&Mod] --&PP|[$NPCPer.raw] -->Check| --:Message| --#hideCard|0 --#hideTitleCard|1 --#emoteState|visible --#emoteText|Your spidey senses tingle --<| --:End| --:X| }}
Hmm, I've tried setting up a test with just the /desc command..  It works, but the player gets "unrecognised command".  Have I done something wrong?
Hi Jonathan K - no, see Timmaugh's post of the 4th, devs aware
1765145158
timmaugh
Forum Champion
API Scripter
DM Deadman said: Is there a way to have it trigger if a player has a high Passive Perception? Like set it up to trigger when a token player passes over it but only if that player's Passive Perception is 15 or higher? Is there a way for it to check the player's sheet for their Passive Perception? Another option is the MetascriptToolbox, which will work in the command line of other scripts (even ScriptCards!). For instance, if the attribute you're looking for on the instigating token is called "passive_wisdom", then you can add an IF block to a command like this: !{& if @(@{instigator_id}.passive_wisdom) >= 15}Hoocha{&else}Lobster{&end}{&simple} The {&simple} is just there because I want both of those options to hit the chat as a proof of concept ({&simple} turns the output into a "simple" chat command; not an "API" command). If you wanted to use the IF block with scripts, you wouldn't want the {&simple}: !{&   if @(@{instigator_id}.passive_wisdom) >= 15}fade --in {&select RoomInfoGraphic}{&end} That would use the Fade script to fade-in a token you'd hidden on the board (something with info about the room). You want to reveal it only if the triggering character has a high enough Passive Perception. There are more tricks that can be accomplished this way... and more bells & whistles. The same can be said for the ScriptCards approach, of course. Just trying to show the options.
1765223336
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It looks like mouse movement now triggers Send to Chat Reactions as of this morning (Dec 8). Thanks, Dev team! R2 said: Same here: Send to Chat happens only if you move the token with your mouse, not with the arrow keys. Makes setting up traps with this pretty useless, if the players can just fly over them unnoticed by using the keyboard! Game Master said: I can't get the reaction/traps to work with keyboard movement, only with mouse dragging.
timmaugh said: DM Deadman said: Is there a way to have it trigger if a player has a high Passive Perception? Like set it up to trigger when a token player passes over it but only if that player's Passive Perception is 15 or higher? Is there a way for it to check the player's sheet for their Passive Perception? Another option is the MetascriptToolbox, which will work in the command line of other scripts (even ScriptCards!). For instance, if the attribute you're looking for on the instigating token is called "passive_wisdom", then you can add an IF block to a command like this: !{& if @(@{instigator_id}.passive_wisdom) >= 15}Hoocha{&else}Lobster{&end}{&simple} The {&simple} is just there because I want both of those options to hit the chat as a proof of concept ({&simple} turns the output into a "simple" chat command; not an "API" command). If you wanted to use the IF block with scripts, you wouldn't want the {&simple}: !{&   if @(@{instigator_id}.passive_wisdom) >= 15}fade --in {&select RoomInfoGraphic}{&end} That would use the Fade script to fade-in a token you'd hidden on the board (something with info about the room). You want to reveal it only if the triggering character has a high enough Passive Perception. There are more tricks that can be accomplished this way... and more bells & whistles. The same can be said for the ScriptCards approach, of course. Just trying to show the options. Could you share some code for IF passive perception is lower then 15, "The room appears empty" but if 15 or higher "You see a secret door!" 
1765297800
timmaugh
Forum Champion
API Scripter
Sure... here's the basic command: !{& if @(@{instigator_id}.passive_wisdom) >= 15}You see a secret door!{&else}The room appears empty.{&end}{&simple} Building out from there, though, would be the question of who do you want to see that? The above would be openly chatted in the game, which might not matter to your situation. On the other hand, if you only wanted the person in charge of the instigating token to receive the message -- as a whisper, then you'd want to include a bit more. If you wanted to whisper to the character represented by that token, that would be: !/w "@{token_name}" {& if @(@{instigator_id}.passive_wisdom) >= 15}You see a secret door!{&else}The room appears empty.{&end}{&simple}