Modme Forums

“Best” way to swap a model via script?

Game Modding | Call of Duty: Black Ops 3 | Scripting


Sleepy216:

So I need to change a model from one to another seamlessly.
Using setmodel, there is a noticeable model swap happening. It is super noticeable if there is a light behind the model.
I tried using show/hide with 2 ents, but you can still notice the swap sometimes. The first show/hide normally isn't noticeable, it's just when I do show/hide the second time to show the original model.

Is there any way around the "flicker" when swapping between two models?
It's not the end of the world, but I figured I'd ask anyway. Thanks for your time!


Spiki:

Slap in a fx when you swap


Harry Bo21:

Put the other model in your map under the floor

The pop your seeing is it loading

If there’s a copy of the model in the map somewhere it won’t pop


Harry Bo21:

Same happens to the perks when they turn on if you have on/off models

The pop also only happens “once” coz of the load

This is why you sometimes find floating junk under stock maps, it’s just to preload it


Sleepy216:

Slap in a fx when you swap

I would... but the models are.. uh huge haha:p I don't think I could make something loook good enough to mask it honestly.

Put the other model in your map under the floor

The pop your seeing is it loading

If there’s a copy of the model in the map somewhere it won’t pop

I'm going to give that a shot, thanks Harry! I just assumed when you precache the model, it loaded it too. This is why you shouldn't just assume haha
Edit: you were 100% correct Harry! There is no pop that happens now! I'm glad I asked and didn't just compromise.


Harry Bo21:

Precache is to preload content, still has to be allocated, just means it’s ready