Skip to content

Gsc rescale models#390

Open
Santahunter wants to merge 2 commits into
iw4x:mainfrom
Santahunter:GSC_Rescale_Models
Open

Gsc rescale models#390
Santahunter wants to merge 2 commits into
iw4x:mainfrom
Santahunter:GSC_Rescale_Models

Conversation

@Santahunter

Copy link
Copy Markdown

Hey, Ive added some more core GSC functions to rescale models as you like.

I think Im going to make a pull request to IW4x soon. Many things and mods can benefit from this.

For example some people may like to resize their warzone zone barrier with it 😉

New Functions are:

resizeModels(<xmodelName>, <factor>, [time])
resetModels(<xmodelName>, [time])
<entity> resizeModel(<factor>, [time])
<entity> resetModel([time])

ResizeModel()

resizes an object by a new factor.
obj resizeModel(<sizeFactor>, <timeInSeconds>); // time parameter is optional, empty or 0 means instant

e.g.

obj = spawn("script_model", self.origin);
obj setModel("zw2_alduin");
obj resizeModel(3, 4); 
// Object becomes 3x as big within 4 seconds with a transition.
// You can also enter values below 1 like 0.5 to shrink the model by 50%

ResetModel()

obj resetModel(<time>); // resets a model to its vanilla size within time. time param is also optional here.

ResizeModels()

Resizes all current and future models with that name to a new size

resizeModels(<name>, <sizeFactor>, <time>); // time optional

e.g.
resizeModels("zw2_alduin", 30, 5);

ResetModels()

resets all current and future models with that name within given time
resetModels("zw2_alduin", 3); // time optional, if you read it till here I think you got it

Reproducable GSC Code for testing:

scale.txt

tinysoldier dragon resize

@wroyca

wroyca commented Jun 14, 2026

Copy link
Copy Markdown
Member

Could we split these changes into a few smaller PRs? It's a bit too large to review effectively as one batch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants