Jump to content

Need a little coding help.


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
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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...