Nope, not quite. Optimus Prime gave the Matrix to Ultra Magnus
when he died, but Ultra Magnus failed to open it.
It was Hot Rod who managed to open it. In doing so, he became
Rodimus Prime.
(PS. I have the VCD.
)
Anyway, I can understand why Megatron won't turn into a pistol for
this life-action movie. It kinda requires a huge suspension of
disbelief to accept that a large two-story robot can somehow shrink
into the size of a pistol.
At the same time, though, I don't think they should turn Megatron
into a tank. They should turn him into a 155mm howitzer or
something... then at least the idea of Megatron transforming into a
'gun' is still there.
After all, in the animated movie, Galvatron could transform himself
into a cannon.