In Indf, how did Gaster end up as a Blaster?
It happened when he got erased from existence by the explosion of a prototype of a machine able to read and change code (timelines readings,etc) which run on DT and electricity.
When the thing blew up it created a hole in the timeline and code got erased by the anomaly, creating sort of a vortex attracting anything nearby into it. Gaster and Sans where the only ones in the room when it happened as Gaster’s other assistants where monitoring everything happening from another room.
Gaster got in contact with DT because of the machine’s explosion ans then got attracted by the vortex. Sans tried to catch him with one of the inactivated blasters as he couldn’t leave his spot or he would have been attracted in too.
Sans was young still and his magic wasn’t strong enough to hold the blaster and Gaster at the same time while resisting the attraction of the vortex.
The vortex collapse on itself after Gaster, who was fusing with the blaster because of the DT, got dragged in it and end up in the void, the hole created by the missing code (it’s why no one remember him except a few person who were near the explosion, because his data was part of the code that got deleted).
He fuse totally with the blaster after entering the void, the absence of data do that he has no basic form set except the one when he entered the void (Gaster still have a soul so he still count as an entity, as he lives on, new data is created) which mean his basic form is actually a semi blaster.
And then I will keep the explanations short:
As soon as he arrive in the void, he lose his memories and turn feral after his transformation for awhile, then calm down because there is literally nothing there,turn back to his basic form, learn how to use the code at his advantage and to watch the timelines and then regain his memory bit by bit. And then things happens.
Sorry, it might be a bit more then what you asked for :’)