you should look at the sliding collision examples in the help files. What you would want in this case is if there was x or z collision (the sides) you would die, and if there was y collision, you kill it. To make it jump assign it the gravity like in the tutorial.