Lucemodok Posted June 10, 2020 Share Posted June 10, 2020 Hello, I'm making a photographer character that uses a camera that makes pictures depending on his sanity, depending on the sanity threshold. "Passionate Picture" high sanity "Bland Picture" medium sanity "Horrible Picture" low sanity My problem is: I have no idea how to make this, any help would be appreciated, and thanks in advance. Link to comment https://forums.kleientertainment.com/forums/topic/118928-help-with-camera-like-item/ Share on other sites More sharing options...
Lucemodok Posted June 11, 2020 Author Share Posted June 11, 2020 local assets = { Asset("ANIM", "anim/camera.zip") } local prefabs = { "picture_good", "picture_meh", "picture_bad", } local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("camera") inst.AnimState:SetBuild("camera") inst.AnimState:PlayAnimation("idle") inst:AddTag("picturetaker") MakeInventoryFloatable(inst, "med", nil, 0.88) inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") MakeHauntableLaunch(inst) return inst end This is what I have btw Link to comment https://forums.kleientertainment.com/forums/topic/118928-help-with-camera-like-item/#findComment-1341835 Share on other sites More sharing options...
IronHunter Posted June 11, 2020 Share Posted June 11, 2020 I feel like you simply need to make a new componentaction to take a picture, and poop out the corresponding picture prefab based on your sanity. I would research how to create a add a new componentaction, and make a component just for this item. For more information I would start by looking at similar existing items that can be right clicked in the inventory to do something such as the pan flute or healing items. 1 Link to comment https://forums.kleientertainment.com/forums/topic/118928-help-with-camera-like-item/#findComment-1341840 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now