Jump to content

Recommended Posts

I just have a really basic (probably) question/problem. How do I scale creatures in game? Like, use code to make them look smaller. I was doing what I do best and dug through already existing mods to try and find a scale related code and I found this in Hound Companions:

    inst.age = data.age

    local scale = easing.inQuad(math.random(), .5+(inst.age*.025), .025, 1) -- Base, Variance, ???
    inst.Transform:SetScale(scale, scale, scale)

Although, presuming inst.age refers to something my creature lacks (ageing) I don't think that would work...

Link to comment
Share on other sites

Do note that the Transform scale will also scale the movement speed for certain entities.

You can also scale the entity with its animstate.

inst.AnimState:SetScale(width, height)

Also it takes two params for this one.

Edited by CarlZalph
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...