Hello,
need some help w/a script ( and i apologize in advance if this topic is already on the forums and i missed it )...I was wondering if someone could help me w/a torch script...i would like to cut the torches duration down (scripting is not in my wheelhouse and i dont think it ever will be , copy and paste is about all i can do.. ) lol
thanks
Maddogg0420
scripting a torch w/a lesser duraction
Re: scripting a torch w/a lesser duraction
In your project folder, within the scripts folder, there is a file called items.lua
Open this file in a text editor, and paste in the following:
*Save the file, and reload the project.
Open this file in a text editor, and paste in the following:
Code: Select all
defineObject{
name = "torch",
class = "Item",
uiName = "Torch",
model = "assets/models/items/torch.fbx",
gfxIndex = 130,
torch = true,
fuel = 550, --==============<< The operative value. The default is 1100
attackPower = 4,
accuracy = 0,
coolDownTime = 3,
attackMethod = "meleeAttack",
attackSwipe = "vertical",
attackSound = "swipe",
impactSound = "impact_blunt",
weight = 1.2,
}-
Maddogg0420
- Posts: 2
- Joined: Thu Sep 01, 2016 9:13 pm
Re: scripting a torch w/a lesser duraction
Thanks Isaac really appreciate you taking the time to respond..works great!
-
trancelistic
- Posts: 275
- Joined: Sat Jun 16, 2012 5:32 am
Re: scripting a torch w/a lesser duraction
THat reminds me. What is the value for food? Also fuel?

Re: scripting a torch w/a lesser duraction
nutrition [a usableItemCoponent value]
EDIT:
[LoG2]
EDIT:
[LoG2]
[LoG1] item nutritionValueUsableItemComponent:setNutritionValue(number) Set nutrition value, i.e. how much food is restored when item is consumed (range 0-1000)
Last edited by Isaac on Sat Sep 17, 2016 8:24 pm, edited 2 times in total.
-
trancelistic
- Posts: 275
- Joined: Sat Jun 16, 2012 5:32 am
Re: scripting a torch w/a lesser duraction
Thanks ISaac. <3Isaac wrote:nutrition [a usableItemCoponent value]
UsableItemComponent:setNutritionValue(number) Set nutrition value, i.e. how much food is restored when item is consumed (range 0-1000)
If only A.H made it easier like that. lols
A torch is just:
fuel = 100,
But food, yeah, use a very long text/string with basicly the same effect.
A noob I always be cuz of this:)
( should be food = 100, )