AvgMedic Posted September 14, 2017 Share Posted September 14, 2017 This may have been brought up before but I want it so that when its day my character is slower (90%) but when its dusk their speed is increased (150%) and when its night they have a good amount of speed (200%) I am not really an expertise on coding Link to comment Share on other sites More sharing options...
Zillvr Posted September 14, 2017 Share Posted September 14, 2017 Hello @AvgMedic, welcome to the forums. Please be aware that all DST modding related questions should be posted in the DST Mods and Tools Subforum. I have already moved this post of yours to the correct subforum so you don't have to make another post. Hopefully the right people will be able to help you with your concerns. Just sit tight and wait for a response, it takes a while cause not everyone who could help are probably not online yet. Cheers. Link to comment Share on other sites More sharing options...
AvgMedic Posted September 14, 2017 Author Share Posted September 14, 2017 Thanks @zillvr Link to comment Share on other sites More sharing options...
DarkXero Posted September 14, 2017 Share Posted September 14, 2017 Abigail changes its damage with the phase. Wolfgang changes its speed with the mightiness. local function UpdateSpeed(inst, phase) local mult = 1 if phase == "day" then mult = 0.9 elseif phase == "dusk" then mult = 1.5 elseif phase == "night" then mult = 2.0 end inst.components.locomotor:SetExternalSpeedMultiplier(inst, "phase_speed", mult) end -- inside master_postinit inst:WatchWorldState("phase", UpdateSpeed) UpdateSpeed(inst, TheWorld.state.phase) Link to comment Share on other sites More sharing options...
AvgMedic Posted September 14, 2017 Author Share Posted September 14, 2017 I had it close to that at one point but i knew i was missing something. Still learning. Thanks for assisting me @DarkXero Link to comment 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