I'm trying to use the DistortChar module (https://www.adventuregamestudio.co.uk/forums/index.php?topic=37079.msg487053#msg487053) in AGS 3.4.0, and whenever I try to distort a character, I get an error message saying "Error: Array index out of bounds (index: 136, bounds: 0..135)."
I thought this might be connected to the module's #define DISTORTABLE_SPRITES line, but changing that number doesn't make any difference.
EDIT: I discovered that if I distort a character in a room's room_load section, I don't get the error message. Looks like I've solved this problem (at least for now).