Goregonzola Posted February 22, 2021 Share Posted February 22, 2021 (edited) Hello! Quick question about inst.Transform:SetScale() Does is completely overwrites given run/walkspeed? I use the SetScale coding in most of my character mods with a 1.1x or a 1.2x scaling (because Extented Sample's models are quite small). I have a hard time making my characters have normal Wilson speed with this coding. It seems like it ignores inst.components.locomotor.walkspeed and inst.components.locomotor.runspeed. Help my poor soul Thanks in advance! Edited February 22, 2021 by BillTheCipher Link to comment https://forums.kleientertainment.com/forums/topic/127305-does-setscale-completely-overwrites-walk-and-run-speed/ Share on other sites More sharing options...
IronHunter Posted February 22, 2021 Share Posted February 22, 2021 There are 2 types of SetScale: AnimState doesn't affect movement speed, scales in x/y, and is what you should be using. Transform which does affect movement speed and scales in 3 Dimensions, as it directly affects mobility I am only assuming there is some affect on the physics as I cannot find any reference of Scale in locomotor. 1 Link to comment https://forums.kleientertainment.com/forums/topic/127305-does-setscale-completely-overwrites-walk-and-run-speed/#findComment-1431686 Share on other sites More sharing options...
Wonderlarr Posted February 22, 2021 Share Posted February 22, 2021 (edited) My character in my own mod is only 0.85 scaled, so I compensated by setting an EXTERNAL speed modifier of 1 divided by my scale, in my case, 1 / 0.85. That works for me to get Wilson speed, I'll clarify later on how to do this if you need more help. Edit: I didn't see IronHunter's post, I don't know how to scale using AnimState, but he says it's better so you should probably figure out how to do that. Edited February 22, 2021 by TheSkylarr Link to comment https://forums.kleientertainment.com/forums/topic/127305-does-setscale-completely-overwrites-walk-and-run-speed/#findComment-1431732 Share on other sites More sharing options...
Goregonzola Posted February 22, 2021 Author Share Posted February 22, 2021 @IronHunter, @TheSkylarr Thanks for the tips! If anyone has more insight about this AnimState strategy on the tip of their tounge, I would gladly take it. Quote My character in my own mod is only 0.85 scaled, so I compensated by setting an EXTERNAL speed modifier of 1 divided by my scale, in my case, 1 / 0.85. That works for me to get Wilson speed, I'll clarify later on how to do this if you need more help. May I ask for a quick little example about this? Link to comment https://forums.kleientertainment.com/forums/topic/127305-does-setscale-completely-overwrites-walk-and-run-speed/#findComment-1431777 Share on other sites More sharing options...
IronHunter Posted February 22, 2021 Share Posted February 22, 2021 16 minutes ago, BillTheCipher said: @IronHunter, @TheSkylarr Thanks for the tips! If anyone has more insight about this AnimState strategy on the tip of their tounge, I would gladly take it. May I ask for a quick little example about this? Its the same way you do transform instead of inst.Transform:SetScale(x,y,z) its inst.AnimState:SetScale(x,y) 2 Link to comment https://forums.kleientertainment.com/forums/topic/127305-does-setscale-completely-overwrites-walk-and-run-speed/#findComment-1431790 Share on other sites More sharing options...
Wonderlarr Posted February 22, 2021 Share Posted February 22, 2021 48 minutes ago, BillTheCipher said: May I ask for a quick little example about this? I'll give it, but I would recommend using the Animstate:SetScale instead, so you can avoid this completely. This is an example of how I'm doing it at the moment. local CScale = inst.transform:GetScale() inst.components.locomotor:SetExternalSpeedMultiplier(inst, "transform_speed_correction", 1 / CScale) I put this in my onbecomehuman code, as that seems to be all it needs to work, however I once again recommend you use Animstate instead of transform. 1 Link to comment https://forums.kleientertainment.com/forums/topic/127305-does-setscale-completely-overwrites-walk-and-run-speed/#findComment-1431809 Share on other sites More sharing options...
Goregonzola Posted February 23, 2021 Author Share Posted February 23, 2021 Thanks for the help! Link to comment https://forums.kleientertainment.com/forums/topic/127305-does-setscale-completely-overwrites-walk-and-run-speed/#findComment-1431976 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now