Jump to content

Recommended Posts

So I'm trying to make it so that when I use my custom item, it changes my character's build and stats, and also resets itself after 2 minutes back to the original stats and build. My custom item is currently a reskinned Healing salve, but I have no idea how to make it reset after 2 minutes after using it.

Link to comment
https://forums.kleientertainment.com/forums/topic/36317-need-a-little-coding-help/
Share on other sites

Use useableitem component:

inst:AddComponent("useableitem")

inst.components.useableitem:SetOnUseFn(onuse_function)

I actually got it working by making it a Edible item, since it is a potion. I got it to go to the initial stat changes and build change, but now It won't revert after 2 mins with DoTaskInTime.

 

EDIT: I found the problem. Ty very much.

Edited by DirtyDan

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
×
  • Create New...