A trigger has but one bug in the vanilla engine. Placing two triggers together creates a 1px gap such that if the player walks right at that edge, neither trigger is triggered. Do not fix this for full emulation, but please fix this (dammit).
if (px > x && py > y && px < x + tw && py < y + ty) { // trigger the trigger.}