Give the deer the bullet behavior and a text instance variable that we'll call brain. Then do events like this. 64 is the look ahead.
Every tick
--- deer: set angle to (player.x, player.y)
--- deer: rotate clockwise 180 degrees
--- deer: set brain to "run!"
--- deer: move forward 64 pixels
Deer is overlapping tree
--- deer: set brain to "tree!"
Every tick
--- deer: move forward -64 pixels
Deer: brain = "tree!"
Deer: is clockwise of angle(deer.x,deer.y,tree.x,tree.y)
--- deer: rotate clockwise 45 degrees
--- deer: set brain to "run!"
Deer: brain = "tree!"
Deer: is counter-clockwise of angle(deer.x,deer.y,tree.x,tree.y)
--- deer: rotate counter-clockwise 45 degrees
--- deer: set brain to "run!"
EDIT:
Just realized this will only work with one deer and one tree as is.
To make it work with more than one deer put everything as subevents of a "for each deer" event.
More importantly to make it work with more than one tree we need to pick the same tree the deer overlapped in the last two events. You can do this by setting a global variable to the tree's uid in the overlap condition. Then use pick by uid in the last two events to pick it again.