Mario384 Posted March 18, 2016 Share Posted March 18, 2016 (edited) Basically title. I'm not sure this is even possible, as I haven't found a way yet, but is there a way to make a certain character, and that character only, to be able to ride a Beefalo and not get booted off? Edited March 18, 2016 by Mario384 Link to comment https://forums.kleientertainment.com/forums/topic/65545-character-who-can-ride-beefalo-forever/ Share on other sites More sharing options...
CarlZalph Posted March 19, 2016 Share Posted March 19, 2016 This will make it so that Wilson won't be bucked off. You can modify the behaviour by changing the prefab name to your target character's prefab. Please note the 'UniqueModNameHere' portion to help avoid conflicts with other mods. AddPrefabPostInit("beefalo", function(inst) if(inst.components~=nil and inst.components.rideable~=nil) then inst.components.rideable.Buck_Old_UniqueModNameHere = inst.components.rideable.Buck inst.components.rideable.Buck = function(inst, gentle) local rider = inst:GetRider() if(rider~=nil and rider.prefab=="wilson") then -- Do nothing else if(inst.Buck_Old_UniqueModNameHere~=nil) then inst:Buck_Old_UniqueModNameHere(gentle) end end end end end ) Link to comment https://forums.kleientertainment.com/forums/topic/65545-character-who-can-ride-beefalo-forever/#findComment-735782 Share on other sites More sharing options...
Muche Posted March 19, 2016 Share Posted March 19, 2016 9 hours ago, CarlZalph said: Please note the 'UniqueModNameHere' portion to help avoid conflicts with other mods. If you don't need the reference to the old method in other places, you can use local variable: AddPrefabPostInit("beefalo", function(inst) if(inst.components~=nil and inst.components.rideable~=nil) then local Buck_Old = inst.components.rideable.Buck inst.components.rideable.Buck = function(inst, gentle) local rider = inst:GetRider() if(rider~=nil and rider.prefab=="wilson") then -- Do nothing else if(Buck_Old~=nil) then Buck_Old(inst, gentle) end end end end end ) Link to comment https://forums.kleientertainment.com/forums/topic/65545-character-who-can-ride-beefalo-forever/#findComment-735855 Share on other sites More sharing options...
Mario384 Posted March 19, 2016 Author Share Posted March 19, 2016 Thanks guys, this method worked out and I'm still tinkering. Thanks for all your help! Link to comment https://forums.kleientertainment.com/forums/topic/65545-character-who-can-ride-beefalo-forever/#findComment-736020 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