Jump to content

Recommended Posts

hi, first and foremost this is my very first post here. i had a question

i'm looking for a prefab called playing_card (the cards which jimbo machine spawns) 
i wanted to add burning component to it and i already have the code however i still didn't find the prefab for it what i did find was component which my fellow said you shouldn't edit that you should find the prefab hence why i'm here 
i'm sorry if it is exteremly simple but any help would be appreciated :-D
 

(oops i think i posted this in a wrong area moderator if you see this please delete it thank you xd)

Edited by shadoww0098

deck_of_cards.lua has both the prefab for decks (where playing cards have been combined) and the playing cards themselves. Regardless of being a combined prefab file, the prefab name should still be "playing_card" if you're using something like AddPrefabPostInit

for future reference the code would look like this

AddPrefabPostInit("playing_card", function(inst)
	inst:AddComponent("fuel") -- the card can be put into fires and stuff
	inst.components.fuel.fuelvalue = TUNING.SMALL_FUEL
	GLOBAL.MakeSmallBurnable(inst, TUNING.SMALL_BURNTIME) -- will burn on the ground
	GLOBAL.MakeSmallPropagator(inst) -- describes the fire strength and range
end)
Edited by oregu

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