I like Dwayne Johnson on-screen regardless of the film he’s in, therefore I liked moments of his crime extravaganza “Skyscraper.”

He plays a lone-hero cop battling heavily armed international robbers holding hostages in a fictional high-tech high-rise built by an Asian magnate. There’s lots of shattered glass, machine-gun fire, fire alarms and cliffhanging vertigo. Among those in danger are his wife and their two children.

As I said, here and there I liked it.

But I liked it more three decades earlier when it was called “Die Hard,” starring a 33-year-old Bruce Willis rather than a 46-year-old the Rock, and was directed with droll logic by John McTiernan (who helmed the ’80s icons “Predator” and “The Hunt for Red October”), not the far-fetched nonsense of Rawson Marshall Thurber (re-teaming with Johnson after 2016’s pleasant mediocrity “Central Intelligence”).

At least there’s old dependable Dwayne, whose innate charm and earnest gung-ho approach to every project cannot be faulted. He plays FBI rescue team leader Will Sawyer, who married and started a family with Sarah (Neve Campbell), the Navy vet/trauma surgeon who saved his life after a hostage situation ended badly.

They and their sugar-sweet twin son and daughter are staying in a fancy Hong Kong super-tower about to open for the extremely wealthy public. The owner, tech mogul Zhao Long Ji (Chin Han), occupies the 220th-floor penthouse. Will, a security consultant, has been examining the structure before the ribbon cutting, which makes him a natural target for a squad of bad guys who plan to burn it down while Zhao is inside and steal his MacGuffin.

Will does much of what Willis’ John McClane did, except he does it with one false leg (Sarah amputated his left after that raid gone wrong) and his wife’s physically active participation in fighting the battles and rescuing the children whenever possible. While every peril is a ridiculous example of over-amped computer effects, they add up to some solid scares. And it’s nice to see that Campbell, a bit of a damsel in distress in the “Scream” horror franchise, has toughened up considerably.

Johnson, projecting a worried family man’s sincerity rather than his customary wit, goes through his paces capably. He wears a beard this time, which is the sort of thing he does to create a new character.

He hops around well on one foot when his artificial lower leg is removed now and then, and he has one genuinely funny gag when he expresses his gratitude for it being handy. He repeatedly falls to certain death, only to grab the thinnest ridge possible at the last second, always making us relieved he didn’t splat asunder. If making that work time after time isn’t acting, what is?

Without a “Die Hard” Hans Gruber-level villain to defeat, this new, revised, less-interesting version never reaches the sassy, “welcome to the party, pal” confidence of the original. The one place it brims with assurance is in lifting plot points from earlier, better movies without fear of triggering intellectual property lawsuits.

In a central sequence, Johnson wraps duct tape around his hands and scales the mile-high building exterior as if he were Tom Cruise climbing outside the Burj Khalifa in fancy spy gloves. And this happens after a bit where they show the Burj on-screen and say the new building here is way, way taller.

Watching “Skyscraper” is like seeing someone reach their hand into a sock, pull it inside out and tell you it’s a different sock. If you decide to watch it anyway, be careful. You may reach the point where rolling your eyes and shaking your head could hospitalize you.