Jump to content

Getting Stronger During Full Moon


Recommended Posts

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

--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 by RedHairedHero
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...