Jump to content

need help coding


Recommended Posts

Is it only the looks? Or do you want to change abilities as well? In that case you may want to just create different prefabs for each "stage" of your weapon and swap them when needed. Anyways: Look at abigail_flower.lua as this is probably a perfect example of the thing you want to accomplish. As for detecting the change of durability/usages, you may want to look into the event "percentusedchange". You can just listen to it like so:

    inst:ListenForEvent("percentusedchange", function(inst, data)
		print(data.percent)
	end)

 

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