Implementing pre-events for templates (a bit of a hack, yes),
and fixing disableCollision() and enableCollision() jumping