Guy problems

I need advice I’ve known and liked this friend of mine since 2015 and he went off to college out of state which put a hard time on our friendship recently we connected again and have been hanging out and enjoying each other’s company a lot we agreed to just be friends but still mess around and it was going well until he began talking about how much he missed his ex which made me feel like just temporary entertainment for him but I really like him and I don’t know what to do