Because I know exactly what you want to make, try this as the function, as it's datablock specific, meaning this wont happen with other datablocks.
function FirstPerson::onTrigger(%this,%obj,%trigger,%val)
and
function ThirdPerson::onTrigger(%this,%obj,%trigger,%val)
Make sure %trigger is 4 and %val is 1 when changing datablock.