A loosely invoked title for a delightfully evocative movie comedy, "Local Hero" confirms the humorous promise shown last year by the Scottish writer-director Bill Forsyth in "Gregory's Girl."

"Local Hero" refers to no character in particular--but Forsyth's disarming, wry, whimsical outlook has ripened into a personal style of extraordinary deftness and enchantment.

Opening today at area theaters, it proves that "Gregory's Girl" was necessary preparation rather than an engaging fluke. Forsyth has found his way, and it depends on creating and sustaining a leisurely, yet slightly daft ambience, in which the incorrigible funniness of human behavior is illustrated with droll proficiency.

Forsyth's way of joking is essentially deadpan social observation; his gags tend to creep up on you or set off a delayed-action fizziness. They certainly avoid announcing themselves with an obtrusive, overfamiliar fanfare, like the snappers in a Neil Simon script. Indeed, if a Forsyth conceit misfires, it's usually because it somehow violates the prevailing casual tone and imposes itself too abruptly.

There's an example early in the film. Forsyth casts Burt Lancaster in a comic character role of a solitary, dreamy oil tycoon whose preoccupations have become cosmic; he derives satisfaction from his avocation, astronomy, rather than the business, which runs itself. His dissatisfaction stirred him to hire an "abuse therapist," who keeps popping up to pepper him with insults, and it takes a while before this quack really fits into Forsyth's comic texture. But once we're into the flow of Forsyth's humorous reverie, even this obvious, manic comic element takes its place in the ongoing harmony.

"Local Hero" depicts the gradual, benign temperamental transformation of a go-getting young oil company executive named MacIntyre, played by Peter Riegert, getting a long-overdue lead after fine work as sidekicks in "National Lampoon's Animal House" and "Chilly Scenes of Winter."

Mac, whose extraction is evidently Hungarian Jewish rather than Scottish, is assigned to negotiate the purchase of a site deemed suitable for a refinery in Western Scotland. It's not a trip that appeals to him; as Mac reminds a coworker and later himself, "I'm more of a telex man; I could sew the deal up in one afternoon on the phone." He's also burdened with an additional commission from Lancaster as company chairman Felix Happer, whose longing for name recognition--the company, Knox Oil, still bears the name of its founder--has turned in the direction of new heavenly bodies. "Anything unusual in Virgo," he instructs the polite but puzzled Mac, "I want reports!"

Mac travels from hermetic environments in Houston to the captivating seacoast environment of Ferness Bay, a picturesque little fishing village where the beaches are warmed incongruously by currents from the Caribbean and the inhabitants eagerly await the opportunity to become fixed for life on the bounty of Knox Oil.

There's really no conflict between Mac and the residents of Ferness Bay, represented in the haggle-free negotiations by an awesomely versatile small-town entrepreneur named Gordon Urquhart, who functions as innkeeper, pub keeper, accountant, unofficial mayor and master lover (he and his wife Stella are a blissfully contented carnal match) and is played with debonair brilliance by Dennis Lawson. As it turns out, Mac has what the Scots want--a welcome windfall in a place where it's difficult to make a living, beautiful scenery or no beautiful scenery--and they've got what he's been unconsciously craving: a piece of scenic and atmospheric paradise.

Complications arise and the lingering, bittersweet irony of the story is that these sharp-dealing worldly guys end up with less to show for the final settlement than the characters who seem utterly dreamy and pixilated. Nevertheless, the film maintains a benevolent comic vision of all its human specimens, whatever their country of origin or outlook.

One of Forsyth's most whimsically effective inventions is a Russian trawler captain named Victor (Christopher Rozycki) who puts in every so often to invest his money through Gordon and indulge in such secret pleasures as singing country and western tunes with a local band, the Ace Tones. Victor's ardent mangling of "Even the Lone Star State Gets Lonesome" provides a sublime comic summation of the movie's themes.

Just as the village casts its spell over Mac in disarming, barely perceptible increments, Forsyth tends to lure you into his comic frame of reference in a deceptively easygoing manner. Sooner or later some odd little detail or funny situation tends to have a weirdly seductive, winning effect, and instead of hovering on the outskirts of the comedy, you find yourself drawn all the way in.

It could happen at the moment when the locals solicitously ask Mac what color he'd prefer on the only phone booth in town; or the scene where Mac and his young Scottish assistant Danny (Peter Capaldi) realize that they've been eating an injured rabbit they were starting to think of as a pet, and Gordon, in his role as waiter, calmly points out, "It was a clear snap; check the bones in the dish if you don't believe it," prompting Mac to check and verify the sad fact; or the decisive moment of forgetfulness in which Mac leaves his wristwatch on a rock, the tide covers it and the forlorn little timepiece goes on beeping plaintively under water.

A feast of comic grace notes, "Local Hero" is bound to strike one that scores a decisive hit on the funny bone, and from that point on every subsequent note seems to enhance and magnify your pleasure. It's summed up in one marvelous interlude where Danny finds himself the love object of a local girl, evidently Ferness Bay's single punker, whose hair has been teased into a lavender-hued rooster's comb. When a friend (played by John Gordon Sinclair, the Gregory of "Gregory's Girl") asks her, "What's so special about him?" the leather-jacketed lassie glumly explains, "He's different." LOCAL HERO

Written and directed by Bill Forsyth; music by Mark Knopfler; edited by Michael Bradsell; production designer, Roger Murray-Leach; associate producer, Iain Smith; produced by David Puttnam for Enigma Productions. This film is rated PG. THE CAST Happer. . . . Burt Lancaster Mac. . . . Peter Riegert Ben. . . . Fulton Mackay Urquart. . . . Denis Lawson