If your 12 year old son pees his pants for attention then I would make him wear the goodnites or pull ups all the time.
If he continues then I would make him wear actual diapers.
You can buy him some Youth Diapers or if he's big enough then adult diapers for him.
Put him in thick plastic backed diapers.
If he can fit in them try the Abu super dry kids diapers on him which are a pampers replica of the old plastic backed diapers.
Treat him like a toddler and make him wear diapers, feed him a bottle, give him a pacifier etc.