xIMattyyx Posted February 14, 2016 Share Posted February 14, 2016 so Im making a character and i want it to be able to run like wilbur the new character for shipwrecked but im not sure how to code it, I've checked the game code and looked at the art for it but i cant find the actual code Link to comment https://forums.kleientertainment.com/forums/topic/64344-coding-a-charater-which-can-run-like-wilbur/ Share on other sites More sharing options...
goldfish911 Posted February 21, 2016 Share Posted February 21, 2016 This is less code-related and more animation-related. From what I know, most characters are reskins of the same template, and they use the same set of animations. I would presume Wilbur uses a different set of animations for moving. Wilbur also might have a different sprite sheet, but I don't know that much about SW. Link to comment https://forums.kleientertainment.com/forums/topic/64344-coding-a-charater-which-can-run-like-wilbur/#findComment-725056 Share on other sites More sharing options...
dahl Posted February 21, 2016 Share Posted February 21, 2016 (edited) Search in wilbur.lua: inst.components.locomotor:AddSpeedModifier_Additive("WILBUR_WALK", TUNING.WILBUR_WALK_SPEED_PENALTY) I not fully sure how it works, but think that your solve may be here. Also i found it in SGwilson.lua. For example: onupdate = function(inst) inst.components.locomotor:RunForward() if inst.components.locomotor.timemoving >= TUNING.WILBUR_TIME_TO_RUN and inst:HasTag("monkey") then inst.sg:GoToState("run_monkey_start") end end, Edited February 21, 2016 by dahl Link to comment https://forums.kleientertainment.com/forums/topic/64344-coding-a-charater-which-can-run-like-wilbur/#findComment-725195 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