A boy in a party hat splashes in the water.
There is a boy wearinga  party hat.
Boy in a hat implies that his part of the body of the boy(where the hat would be placed) is within the domains of the hat.  Thus, the boy is in a party hat.
exists e1 x1 x2 x3 x4.(n_water(x4) & in(e1,x4) & Actor(e1,x1) & v_splash(e1) & in(x1,x2) & n_hat(x2) & of(x2,x3) & n_party(x3) & n_boy(x1))
exists p1 x1 x2 x3 x4 x5.((x1 = x2) & n_hat(x2) & of(x2,x5) & n_party(x5) & of(x2,x4) & n_wearinga(x4) & of(x2,x3) & n_boy(x3))