Alright, so I'm working on a terrain piece that uses foam board as a base, I got ready to primer it when a bit of

fell out of my brain, stooping over to pick it up before it slipped through the cracks in my skull, I remembered that some Styrofoam melted when sprayed. Deciding that melting my project wasn't quite the way to go, I picked up a piece of foam board, applied spray paint, and left it there. when I returned about 2 minutes later, the foam was gone, and the board was glued together by the black remains of what I presume was some vile excrement, laid down by billions of ants as they stole all of my foam

.
Since I don't want ants stealing my foam, I was wondering how people got around this problem of giving a basecoat to foam without making it disappear.
My current materials are
Acrilic black paint
Sealant (which I still need practice on using) .
However, I can easily acquire more of whatever the noble dakite council suggests