Nothing caught comedy fans by surprise quite like “The Hangover” did in 2009. And because the third, and final, part of this raunchy franchise needs to tie up loose ends, “The Hangover Part III” isn’t as surprising.

But it’s funny and wraps up the story as it must with a finale that, in a sense, shows the scenario is never-ending.

Phil (Bradley Cooper), Stu (Ed Helms) and Alan (Zach Galifianakis) are back together, this time to help Alan, who has become even more unpredictable. This time, he has bought a giraffe and takes it home in a trip that ends with a sort of “Final Destination”-type disaster (at least for the hapless animal and several other drivers).

Alan has an argument with his dad, who proceeds to have a heart attack and die while Alan contentedly listens on headphones, oblivious to the life-or-death scene that’s unfolding a few feet away from him. Alan’s brother-in-law Doug (Justin Bartha) decides the whole gang should hold an intervention for Alan.

Alan agrees to get help, so the other guys decide to take him to a clinic. But on their way to Arizona, their vehicle is rammed from behind by a guy named Marshall (John Goodman), a thug who wants to use them to find Mr. Chow (Ken Jeong). Turns out Chow has stolen gold from Marshall, who will stop at nothing to get it back — and that includes holding Doug hostage.

So the Wolfpack takes off to find Chow, who has been corresponding with Alan, and return the gold to Marshall. Chow, who leads them on a wild and dangerous chase, is not the only familiar face they encounter. The characters played by Mike Epps and Heather Graham also have a hand in this. 

It’s not as hilarious or as well-constructed as the first two movies, but it is erratically funny and constantly makes nods to its predecessors as a wrap-up. Chow and Alan are the central characters here, with Chow more psychopathic than ever and Alan just as strange as ever (although he does find a love interest at last).

The movie’s location settles once again on Las Vegas, just as it should. And, true to form, there’s a scene at the beginning of the credits that is the true finale, with the group waking up, once again, from a night of debauchery.

I can see the three-in-one box set now — maybe just in time for New Year’s — with a bottle of aspirin as an attachment.