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 .
×

It's a Trap - Double Chat alerts

Anyone have a clue why I would be getting doubled chat alerts to any trap that is set off? I have tested with multiple accounts and browsers - cannot find problem in the script. running 3.1
1481920045
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Could you please provide the GM Notes for the trap?
"_id":"-KYUBqK6r0rP2S6SdHk1","_pageid":"7F73B956-71C3-4C5B-8C72-576EE4F15EA4","left":352,"top":827,"width":50,"height":50,"rotation":0,"layer":"gmlayer","isdrawing":false,"flipv":false,"fliph":false,"imgsrc":"<a href="https://s3.amazonaws.com/files.d20.io/images/24677289/E0CWXHEoNpbB0GX9S84snw/med.png?1477684295&quot;,&quot;name&quot;:&quot;bardguard_01&quot;,&quot;gmnotes&quot;:&quot;{\&quot;message\&quot;:\&quot;Hello" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/24677289/E0CWXHEoNpbB0GX9S84snw/med.png?1477684295","name":"bardguard_01","gmnotes":"{\"message\":\"Hello</a> there visitor may I see your room key? \",\"type\":\"hiding character\",\"stopAt\":\"none\",\"revealLayer\":\"objects\",\"sound\":\"bardsinn_guard_01\"}","controlledby":"","bar1_value":"17","bar1_max":"","bar1_link":"-KVOZWf0QCK2gGrb4Jxh","bar2_value":"16","bar2_max":"","bar2_link":"-KVOZWf-SUUinDorrM0z","bar3_value":"","bar3_max":"","bar3_link":"","represents":"-KVOZWc6338z6P9o-TdL","aura1_radius":1,"aura1_color":"#FFFF99","aura1_square":false,"aura2_radius":"","aura2_color":"#59E594","aura2_square":false,"tint_color":"transparent","statusmarkers":"cobweb,bleeding-eye,fluffy-wing","showname":false,"showplayers_name":false,"showplayers_bar1":false,"showplayers_bar2":false,"showplayers_bar3":false,"showplayers_aura1":false,"showplayers_aura2":false,"playersedit_name":true,"playersedit_bar1":true,"playersedit_bar2":true,"playersedit_bar3":true,"playersedit_aura1":true,"playersedit_aura2":true,"light_radius":"","light_dimradius":"","light_otherplayers":false,"light_hassight":false,"light_angle":"","light_losangle":"","light_multiplier":1,"sides":"","currentSide":0,"lastmove":"345,828","_type":"graphic","_subtype":"token","_cardid":""},{"_id":"-KYUL4dDVSfMOmDXqzjh","_pageid":"7F73B956-71C3-4C5B-8C72-576EE4F15EA4","left":363.66575273328925,"top":814.8913218992446,"width":93.33150546657848,"height":57.782643798489225,"rotation":0,"layer":"gmlayer","isdrawing":false,"flipv":false,"fliph":false,"imgsrc":"<a href="https://s3.amazonaws.com/files.d20.io/images/26075224/HNoHpAdeFhabZWbExUqwCw/max.jpg?1481215854&quot;,&quot;name&quot;:&quot;guard_station_03&quot;,&quot;gmnotes&quot;:&quot;{\&quot;type\&quot;:\&quot;secret\&quot;,\&quot;message\&quot;:\&quot;The" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/26075224/HNoHpAdeFhabZWbExUqwCw/max.jpg?1481215854","name":"guard_station_03","gmnotes":"{\"type\":\"secret\",\"message\":\"The</a> door opens. You see a sign on the wall that says - Please notify guard of any issues.\"}","controlledby":"","bar1_value":"","bar1_max":"","bar1_link":"","bar2_value":"","bar2_max":"","bar2_link":"","bar3_value":"","bar3_max":"","bar3_link":"","represents":"","aura1_radius":"","aura1_color":"#FFFF99","aura1_square":false,"aura2_radius":"","aura2_color":"#59E594","aura2_square":false,"tint_color":"transparent","statusmarkers":"cobweb,bleeding-eye","showname":false,"showplayers_name":false,"showplayers_bar1":false,"showplayers_bar2":false,"showplayers_bar3":false,"showplayers_aura1":false,"showplayers_aura2":false,"playersedit_name":true,"playersedit_bar1":true,"playersedit_bar2":true,"playersedit_bar3":true,"playersedit_aura1":true,"playersedit_aura2":true,"light_radius":"","light_dimradius":"","light_otherplayers":false,"light_hassight":false,"light_angle":"","light_losangle":"","light_multiplier":1,"sides":"","currentSide":0,"lastmove":"396.66575273328925,728.8913218992446","_type":"graphic","_subtype":"token","_cardid":""}] [] [{
1481921322
Ada L.
Marketplace Creator
Sheet Author
API Scripter
David M said: "_id":"-KYUBqK6r0rP2S6SdHk1","_pageid":"7F73B956-71C3-4C5B-8C72-576EE4F15EA4","left":352,"top":827,"width":50,"height":50,"rotation":0,"layer":"gmlayer","isdrawing":false,"flipv":false,"fliph":false,"imgsrc":" <a href="https://s3.amazonaws.com/files.d20.io/images/24677289/E0CWXHEoNpbB0GX9S84snw/med.png?1477684295&quot;,&quot;name&quot;:&quot;bardguard_01&quot;,&quot;gmnotes&quot;:&quot;{\&quot;message\&quot;:\&quot;Hello" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/24677289/E0CWXHEoNpbB0GX9S84snw/med.png?1477684295","name":"bardguard_01","gmnotes":"{\"message\":\"Hello</a> there visitor may I see your room key? \",\"type\":\"hiding character\",\"stopAt\":\"none\",\"revealLayer\":\"objects\",\"sound\":\"bardsinn_guard_01\"}","controlledby":"","bar1_value":"17","bar1_max":"","bar1_link":"-KVOZWf0QCK2gGrb4Jxh","bar2_value":"16","bar2_max":"","bar2_link":"-KVOZWf-SUUinDorrM0z","bar3_value":"","bar3_max":"","bar3_link":"","represents":"-KVOZWc6338z6P9o-TdL","aura1_radius":1,"aura1_color":"#FFFF99","aura1_square":false,"aura2_radius":"","aura2_color":"#59E594","aura2_square":false,"tint_color":"transparent","statusmarkers":"cobweb,bleeding-eye,fluffy-wing","showname":false,"showplayers_name":false,"showplayers_bar1":false,"showplayers_bar2":false,"showplayers_bar3":false,"showplayers_aura1":false,"showplayers_aura2":false,"playersedit_name":true,"playersedit_bar1":true,"playersedit_bar2":true,"playersedit_bar3":true,"playersedit_aura1":true,"playersedit_aura2":true,"light_radius":"","light_dimradius":"","light_otherplayers":false,"light_hassight":false,"light_angle":"","light_losangle":"","light_multiplier":1,"sides":"","currentSide":0,"lastmove":"345,828","_type":"graphic","_subtype":"token","_cardid":""},{"_id":"-KYUL4dDVSfMOmDXqzjh","_pageid":"7F73B956-71C3-4C5B-8C72-576EE4F15EA4","left":363.66575273328925,"top":814.8913218992446,"width":93.33150546657848,"height":57.782643798489225,"rotation":0,"layer":"gmlayer","isdrawing":false,"flipv":false,"fliph":false,"imgsrc":" <a href="https://s3.amazonaws.com/files.d20.io/images/26075224/HNoHpAdeFhabZWbExUqwCw/max.jpg?1481215854&quot;,&quot;name&quot;:&quot;guard_station_03&quot;,&quot;gmnotes&quot;:&quot;{\&quot;type\&quot;:\&quot;secret\&quot;,\&quot;message\&quot;:\&quot;The" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/26075224/HNoHpAdeFhabZWbExUqwCw/max.jpg?1481215854","name":"guard_station_03","gmnotes":"{\"type\":\"secret\",\"message\":\"The</a> door opens. You see a sign on the wall that says - Please notify guard of any issues.\"}","controlledby":"","bar1_value":"","bar1_max":"","bar1_link":"","bar2_value":"","bar2_max":"","bar2_link":"","bar3_value":"","bar3_max":"","bar3_link":"","represents":"","aura1_radius":"","aura1_color":"#FFFF99","aura1_square":false,"aura2_radius":"","aura2_color":"#59E594","aura2_square":false,"tint_color":"transparent","statusmarkers":"cobweb,bleeding-eye","showname":false,"showplayers_name":false,"showplayers_bar1":false,"showplayers_bar2":false,"showplayers_bar3":false,"showplayers_aura1":false,"showplayers_aura2":false,"playersedit_name":true,"playersedit_bar1":true,"playersedit_bar2":true,"playersedit_bar3":true,"playersedit_aura1":true,"playersedit_aura2":true,"light_radius":"","light_dimradius":"","light_otherplayers":false,"light_hassight":false,"light_angle":"","light_losangle":"","light_multiplier":1,"sides":"","currentSide":0,"lastmove":"396.66575273328925,728.8913218992446","_type":"graphic","_subtype":"token","_cardid":""}] [] [{ Woah, there! I only need the GM notes for the traps. Also, for future troubleshooting could you please put the GM Notes&nbsp; inside a code block like this? Anyways, nothing from the JSON in the GM Notes looks out of the ordinary. What other scripts are you running in your game?
sorry -&nbsp;
1481923062

Edited 1481923103
Ada L.
Marketplace Creator
Sheet Author
API Scripter
I'm having trouble reproducing your issue. I see that you have a custom trap type though called "conversation" and that you've imported the JS for It's A Trap. Were you trying to edit the script?&nbsp;
yes - have a edited version of the trap script running - not much change - basically added additional trap types - as I am using the script more as a method to activate graphics, sounds, and give chat descriptions to players for events and encounters. &nbsp; Nothing functional changed.
There are no errors showing on my API console
1481923654
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Do the double messages appear if you use the unmodified script?
yes
For both they only seem to appear for a npc used - I call a guard to the object layer from the GM layer
I am using a tile in the floor of the hall to trigger two other traps - one is the NPC guard, and the other is an image of the door open. All things function properly but the NPC message is the one that fires twice - the second time it includes the NPC's name at the bottom of the chat
1481924804
Ada L.
Marketplace Creator
Sheet Author
API Scripter
I just tried moving an NPC over a trap from the GM layer to the objects layer. That didn't trigger an trap activation for me. Are you sure the additional type is the only modification you made to the script??? I.E. to activate traps for objects ontop of them that are moved from the GM layer to the objects layer?
1481924860
Ada L.
Marketplace Creator
Sheet Author
API Scripter
David M said: I am using a tile in the floor of the hall to trigger two other traps - one is the NPC guard, and the other is an image of the door open. All things function properly but the NPC message is the one that fires twice - the second time it includes the NPC's name at the bottom of the chat In that case, could you also share that tile's GM Notes?
Guard {"type":"conversation","message":"Hello there visitor may I see your room key?","revealLayer":"objects","sound":"bardsinn_guard_01","stopAt":"none","hideSave":true,"spotDC":null,"revealWhenSpotted":true}
Tile&nbsp; {"sound":"trigger_bell_01","message":"You hear someone opening the door in front of you.","triggers":["Mardak the Guard","guard_station_03"],"type":"trigger","gmOnly":false,"revealLayer":"map"}
1481928440
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Your tile is activating two traps: The guard and a third trap called guard_station_03. Could you also provide the GM Notes for guard_station_03?
{"type":"you see","message":"The door opens. You see a sign on the wall that says - Please notify guard of any issues."}
1481931115
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Okay. So, I've reconstructed your trap system, moved a character over the trigger trap, and got the following output in the chat. This is the correct output I'd expect from the JSON you've provided. Sorry, but I'm not getting any duplicated messages. :/
I redid the .js file, turned off all other scripts except trap system, and redid each trap from the beginning ... seems the problem is &nbsp;/ was with that copy of the guard ... no idea what - I didn't change anything I just put a new copy of him down and set him up the same way .... now no problems.
effect distance - 0 does not cause an additional message from the GM, but when I set it to a # it fires off the message from the Game Master
Once I change it to a value it somehow alters the object and now it doubles message just like original
1481933630
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Ok. I see what's happening now. Because you had an effect radius set, when the guard was triggered, it displayed the trap's message once to announce it, and then another time for each character in the effect radius (including most likely the character that triggered it). It displays it the first time in case no characters aren't inside its effect radius. This makes the most sense for something like an explosion trap that gets triggered&nbsp;
went through the whole process again and it is ok as long as I don't change the effect distance
ahh sorry I missed your solution
is it possible to disable that&nbsp;
1481934929
Ada L.
Marketplace Creator
Sheet Author
API Scripter
For your guard, just don't set its effect distance.
k- guess that does work - thanks for your help in looking at this&nbsp;