TheGamerDracul Posted March 28, 2017 Share Posted March 28, 2017 Hey again! A new problem came up that I am trying to solve. My character's stats change during the phases, including the full moon. However I am having a problem implementing that one ability. It works, but only if you log off and log back in, or step into a cave. Basically only works if you leave to a different area while the full moon is active. I thought I made this work before, but I think I screwed up somewhere and can't figure out how to make it work. I've looked at other modded character scripts and even Woodies but I just can't find the solution. Link to comment Share on other sites More sharing options...
RedHairedHero Posted March 28, 2017 Share Posted March 28, 2017 (edited) --Function where you would increase your damage local function FullMoonBuff(inst, isfullmoon) if isfullmoon then --increase power end end --Watches to see if a fullmoon occurs, when it does occur it calls the function above, put this part into your master_postinit function inst:WatchWorldState("isfullmoon", FullMoonBuff) You'll also need a function that will remove your power when the fullmoon is over. local function onnewstate(inst, isfullmoon) if not isfullmoon then --set power to normal end end -- This part will go where the WatchWorldState goes. inst:ListenForEvent("newstate", onnewstate) Edited March 28, 2017 by RedHairedHero Link to comment Share on other sites More sharing options...
TheGamerDracul Posted March 28, 2017 Author Share Posted March 28, 2017 I'll try this out. Thanks! 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