Jump to content

Recommended Posts

I have noticed a lot of characters have components, and I have experimented with adding components to a character, but with minimal success.

 

Typically, I am using components that are easy to test, but not game changing, like "Shaver," for a character who can shave with their bare hands.

 

 

Additionally, I have been looking for a reference with the fueled component, I understand the basics of it, but I haven't seen a practical use of it on an item in the files (Since I cannot find the lantern anywhere in the files.)

All components work. They are just code.

Why would you attach the fueled component to a character is beyond me though.

 

What is fueled? Fueled allows a prefab to accept items with a FUELTYPE, and changes it's fuel value accordingly (it recharges). Its fuel value also dminishes over time. This is what allows campfires to accept boards, get bigger with boards, and when they reach 0 fuel, they extinguish and die.

 

Lantern is in mininglantern.lua.

All components work. They are just code.

Why would you attach the fueled component to a character is beyond me though.

 

What is fueled? Fueled allows a prefab to accept items with a FUELTYPE, and changes it's fuel value accordingly (it recharges). Its fuel value also dminishes over time. This is what allows campfires to accept boards, get bigger with boards, and when they reach 0 fuel, they extinguish and die.

 

Lantern is in mininglantern.lua.

 

I want to attach the Shaver component to a character, the fueled component to an item.

 

I was simply looking through the files, and couldn't find a good example of Fueled getting used for reference.

 

I was trying out the following line:

inst:AddComponent("shaver")
Edited by Walrusjones

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