[Help] Problem with It's a trap script

Hi, I found an issue with "It's a trap" script (5e ogl generic). When I set up a trap on a map if I put a new token (monsters, objects, player heroes etc) on the tabletop the trap triggers and the token is pulled to his center. Yesterday i had my traps discovered by my players this way, and it was bad :D
1507508875
The Aaron
Pro
API Scripter
This probably is more of “an unfortunate side-effect” than an error. The API has no way of identifying who manipulates a token, so it doesn’t know to not activate when you create/move a token as the GM. Hopefully Stephen L. has a solution for you. 
I think I've understood the reason beyond the strange traps behaviour. Probably it was due to the big cage token upon traps. I don't know how the program manage the new tokens you put on the tabletop in real-time, but I'm sure the problem was there. It's like the cage token is detected just when I put new tokens on the map. I moved the cage (highlighted in yellow) on the tokens layer and flag the "wings" symbol on it to not trigger the traps (marked in red). Now everything seems fine. 
1507657219

Edited 1507657245
Stephen L.
Pro
Marketplace Creator
Sheet Author
API Scripter
I'm not sure what you're saying the issue is here. Are you saying that any time you place a token anywhere on the map the trap triggers? I can't really tell what's going on in that screenshot there.
1507661058
I've seen this happen when I'm dragging tokens onto the map with set traps but I can't duplicate it now; I thought  it only occurred if I dragged the tokens across the trap area so I've been careful to not do that, but like I said; I can't duplicate this right now.
Stephen L. said: I'm not sure what you're saying the issue is here. Are you saying that any time you place a token anywhere on the map the trap triggers? I can't really tell what's going on in that screenshot there. If you look at the screenshot down here you can notice some traps I previously set up and a big cage (I draw a dotted red line to make it easy to see) token. I put the cage and the traps both on GM layer with the idea of imprison the players under the cage (switching it to the map layer to make it visible). One of my player launched light spell and put a token to represent the spell on the board (with light radius etc). The light token automatically triggered one of the trap. I'm quite sure that this is due because the cage token was on the same layer (GM layer) as traps overlapping with them. I did some experiments putting alernatively traps and cage token "to back" and "on top". Traps activate in an unpredicatable way. Hope my explanation is more clear now.   
1507667546
Stephen L.
Pro
Marketplace Creator
Sheet Author
API Scripter
So effectively when your player creates a light spell overlapping the cage trap, it triggers all of the traps?
No, it triggers a random one.  
1507744259

Edited 1507744311
Ok I've done some experiments and I discovered that sometimes traps trigger even if I totally remove the cage token. I've noticed even that this happens only if I put the new tokens on the board directly on token layer. If I put new tokens on GM layer and then switch to token layer traps don't activate in that strange way.
1507755146

Edited 1507755684
Stephen L.
Pro
Marketplace Creator
Sheet Author
API Scripter
I've been trying to replicate your issue for the last few days using the information you've given me about the problem. Dropping tokens onto a map with some traps works fine for me. At this point, I don't know why it's not working for you. Could you provide the GM Notes for the trap tokens? Do the traps trigger normally if you move existing tokens over them?
Stephen L. said: Could you provide the GM Notes for the trap tokens? {"message":"Una scossa elettrica attraversa il tuo corpo","notes":"Danno doppio per chi indossa armature di ferro o acciaio","sound":"Electric Shock","damage":"3d8","missHalf":true,"hideSave":true,"save":"dex","saveDC":12,"revealLayer":"objects"} Traps trigger normally when I move existing tokens over them. 
1507813454

Edited 1507823800
Stephen L.
Pro
Marketplace Creator
Sheet Author
API Scripter
I tried using the GM Notes data to test it out. Unfortunately, I still couldn't replicate your issue. I've tried setting the traps up in all sort of different places, but each time I try and drop a random token onto the map, it doesn't trigger any traps. Sorry, but if I can't find a way to reliably reproduce your issue, then I won't be able to track it down and fix it. I would be curious to know if anyone else has had this issue and knows a reliable way to reproduce it. For now I'll log this thread as a known issue in the main script thread for future reference.