If player is to the left of AI
If area to left is open
If there is floor to the left
Move left
Else
If there is floor two or three tiles to the left and there is no wall two or three tiles to the left
Move left and jump
Else
Check above? Maybe just jump and keep checking
End
End
Else
If area to the right is open
If there is floor to the right
Move right
Else
If there is floor two or three tiles to the left and there is no wall two or three tiles to the left
Move left and jump
Else
Check above? Maybe just jump and keep checking
End
End
Else
Jump, set something to check if area to left is open then right. If AI lands without moving left or right, then the AI must be in a pit-—idk what to do at this point
End
End
End
.next part is pretty much same as previous--just switch "left" with "right" and vice-versa =P
If player is to the right of AI
If area to right is open
If there is floor to the right
Move right
Else
If there is floor two or three tiles to the right and there is no wall two or three tiles to the right
Move right and jump
Else
Check above? Maybe just jump and keep checking
End
End
Else
If area to the left is open
If there is floor to the left
Move left
Else
If there is floor two or three tiles to the right and there is no wall two or three tiles to the right
Move right and jump
Else
Check above? Maybe just jump and keep checking
End
End
Else
Jump, set something to check if area to right is open then left. If AI lands without moving right or left, then the AI must be in a pit-—idk what to do at this point
End
End
End