truck dies when warms up on 1995 Ford Ranger

ranger starts fine but when it warms up it dies and has no house power. but for the first 5 mins it run okay but after that its dies.but then starts back up fine.

2 answers
check to see if you have any trouble codes may be a sensor crankshaft or camshaft you need a diagnostic to be certain of what it is
sounds like my old lawn mower it was the coil in it. as it warms up it shorts.