Hollywood works in truly mysterious ways. On the one hand it decides to update the old Gerry Anderson marionette TV series “Thunderbirds,” but does so in the form of a live-action kiddie movie (and not an especially good one at that). On the other, it funds a new comedy by Trey Parker and Matt Stone that effectively uses that same program as the springboard for a satirical swipe at post-9/11 America, but does this one in the old Anderson marionette manner, though predictably on a much more elaborate scale than the British director could ever manage. One can understand Parker and Stone’s desire to employ the ostensibly low-tech style–it’s a campy counterpart to the kind of deceptively amateurish animation that’s served them so well on “South Park.” Unfortunately, in the case of “Team America” the result is much less consistently amusing, though it has moments of inspiration.

The set-up combines the “Thunderbirds” motif with elements of splashy modern action extravaganzas, adding to the mix a constant flow of the gross-out situations and ostentatiously scatological language for which Parker and Stone are famous. The titular “heroes,” to use the term loosely, are a bunch of gung-ho American daredevils who pursue terrorists from their Mount Rushmore base with such riotous abandon that they’re totally oblivious to the destruction they wreak in the process. (Among the landmarks they demolish in the course of the movie are the Eiffel Tower, the Louvre, the Sphinx and the Great Pyramid.) When one of their members is killed, in a mawkish scene reminiscent of old World War II melodramas, the stentorian head of their operation, Spootiswoode, recruits a new fellow–a Broadway singer named Gary (from the cast of “L.E.A.S.E.,” no less) whom he considers the world’s greatest actor–to join them in foiling a massive terrorist plot using WMDs. Gary’s reluctance is ultimately overcome, and there follow a morass of romantic entanglements among the team members that threaten their ability to work together. At the same time, a horde of Hollywood liberal types, most notably Alec Baldwin and Michael Moore, take aim against Team America (the acronym of Baldwin’s group, called the Film Actors Guild, is pummeled into the ground), while the real mastermind behind everything–North Korean dictator Kim Jung Il–is revealed, leading to a final confrontation in Pyongyang, where the team is pitted not only against Kim but Baldwin’s “peacenik” cohorts too–who turn out to be much more prone to violence than their pacifistic words would suggest.

There’s funny stuff to be found here, curiously in the final segments more than the earlier ones. A background song directed against “Pearl Harbor” and Ben Affleck has great lyrics, and Kim’s long musical number about being lonely is great, even if it is reminiscent of Satan’s morose numbers from “South Park.” The takeoff on Moore is good, too. (Indeed, the left takes a much more sustained hit than the right, who are merely depicted as well-intentioned but bumbling buffoons.) There’s also a scene involving a dissipated Gary that’s perhaps the funniest example you’ll see of a usually deadly genre–the throwing-up sequence. And the already-notorious puppet-sex montage is hilarious, though unbelievably crude. But it’s surprising how flat much of “Team America” is. The egregiously anti-PC tone is welcome (where else will you find a song that seeks yucks from the AIDS epidemic and a knee-jerk liberal response to it?), but much of the time the spoofing of Jerry Bruckheimer-style action flicks is barely passable. The Team America members, including Gary, are in truth a pretty boring bunch (even if that’s the idea, it’s not a sound one); and while some of the puppetry works nicely–the Kim Jung Il lookalike is a triumph (though Parker’s Charlie Chan voicing will doubtlessly earn some brickbats)–in other cases it’s curiously off. The Baldwin marionette, for instance, isn’t a very good caricature of the real thing either visually or vocally, and the same is true of most of the other simulacra of the liberal elite like Martin Sheen or Tim Robbins (the Moore puppet is an exception–and there’s too little of him). The stream of potty-mouth language, moreover, is so extreme and persistent that it quickly ceases to be funny and just becomes dull. It’s not enough to use dirty words; they need to be employed in a clever way.

You have to admire the technical skill that must have gone in to making “Team America” so goofily crummy, but at best the picture is only fitfully amusing, certainly not up to the standard set by the “South Park” movie. On the other hand, it’s no “BASEketball” either. In quality, if not in tone, it’s just middling–which isn’t quite good enough.