Electroely Posted April 21, 2017 Share Posted April 21, 2017 Just wondering, would it be possible to make a mod that makes other raid bosses lock their camera when they die the same way the Fuelweaver does it? Link to comment https://forums.kleientertainment.com/forums/topic/78020-fuelweavers-death-camera-lock-on-other-creatures/ Share on other sites More sharing options...
Destros09 Posted April 21, 2017 Share Posted April 21, 2017 47 minutes ago, Electroely said: Just wondering, would it be possible to make a mod that makes other raid bosses lock their camera when they die the same way the Fuelweaver does it? I want this on butterflys Link to comment https://forums.kleientertainment.com/forums/topic/78020-fuelweavers-death-camera-lock-on-other-creatures/#findComment-911292 Share on other sites More sharing options...
DarkXero Posted April 21, 2017 Share Posted April 21, 2017 local focustime = { bee = 3, toadstool = 5, } local function OnFocusCamera(inst) local player = GLOBAL.TheFocalPoint.entity:GetParent() if player ~= nil then GLOBAL.TheFocalPoint:PushTempFocus(inst, 6, 22, 6) end end local function DoDeathFocus(inst) if inst.modcamerafocusdeath:value() then if inst.modcamerafocusdeathtask == nil then inst.modcamerafocusdeathtask = inst:DoPeriodicTask(0, OnFocusCamera) end elseif inst.modcamerafocusdeathtask ~= nil then inst.modcamerafocusdeathtask:Cancel() inst.modcamerafocusdeathtask = nil end end local function CancelDeathFocus(inst) inst.modcamerafocusdeath:set(false) end local function TriggerDeathFocus(inst) inst.modcamerafocusdeath:set(true) inst:DoTaskInTime(focustime[inst.prefab], CancelDeathFocus) end local function DeathFocusInit(inst) inst.modcamerafocusdeath:set_local(false) if not GLOBAL.TheNet:IsDedicated() then inst:ListenForEvent("modcamerafocusdeathdirty", DoDeathFocus) end if GLOBAL.TheWorld.ismastersim then inst:ListenForEvent("death", TriggerDeathFocus) end end local function DeathFocus(inst) inst.modcamerafocusdeathtask = nil inst.modcamerafocusdeath = GLOBAL.net_bool(inst.GUID, "mod.modcamerafocusdeath", "modcamerafocusdeathdirty") inst:DoTaskInTime(0, DeathFocusInit) end for k, v in pairs(focustime) do AddPrefabPostInit(k, DeathFocus) end Link to comment https://forums.kleientertainment.com/forums/topic/78020-fuelweavers-death-camera-lock-on-other-creatures/#findComment-911408 Share on other sites More sharing options...
Electroely Posted April 21, 2017 Author Share Posted April 21, 2017 Spoiler 2 hours ago, DarkXero said: local focustime = { bee = 3, toadstool = 5, } local function OnFocusCamera(inst) local player = GLOBAL.TheFocalPoint.entity:GetParent() if player ~= nil then GLOBAL.TheFocalPoint:PushTempFocus(inst, 6, 22, 6) end end local function DoDeathFocus(inst) if inst.modcamerafocusdeath:value() then if inst.modcamerafocusdeathtask == nil then inst.modcamerafocusdeathtask = inst:DoPeriodicTask(0, OnFocusCamera) end elseif inst.modcamerafocusdeathtask ~= nil then inst.modcamerafocusdeathtask:Cancel() inst.modcamerafocusdeathtask = nil end end local function CancelDeathFocus(inst) inst.modcamerafocusdeath:set(false) end local function TriggerDeathFocus(inst) inst.modcamerafocusdeath:set(true) inst:DoTaskInTime(focustime[inst.prefab], CancelDeathFocus) end local function DeathFocusInit(inst) inst.modcamerafocusdeath:set_local(false) if not GLOBAL.TheNet:IsDedicated() then inst:ListenForEvent("modcamerafocusdeathdirty", DoDeathFocus) end if GLOBAL.TheWorld.ismastersim then inst:ListenForEvent("death", TriggerDeathFocus) end end local function DeathFocus(inst) inst.modcamerafocusdeathtask = nil inst.modcamerafocusdeath = GLOBAL.net_bool(inst.GUID, "mod.modcamerafocusdeath", "modcamerafocusdeathdirty") inst:DoTaskInTime(0, DeathFocusInit) end for k, v in pairs(focustime) do AddPrefabPostInit(k, DeathFocus) end Thanks! Would you allow me to upload it on the Steam Workshop (if you haven't done so already)? Mostly just so I don't have to redownload it manually... I'll give you full credit on the workshop page if you want it... Link to comment https://forums.kleientertainment.com/forums/topic/78020-fuelweavers-death-camera-lock-on-other-creatures/#findComment-911464 Share on other sites More sharing options...
Sudura2017 Posted April 21, 2017 Share Posted April 21, 2017 8 hours ago, Destros09 said: I want this on butterflys Rabbits. Every time you trap them. From across the world. Link to comment https://forums.kleientertainment.com/forums/topic/78020-fuelweavers-death-camera-lock-on-other-creatures/#findComment-911467 Share on other sites More sharing options...
DarkXero Posted April 21, 2017 Share Posted April 21, 2017 1 hour ago, Electroely said: Thanks! Would you allow me to upload it on the Steam Workshop (if you haven't done so already)? Mostly just so I don't have to redownload it manually... I'll give you full credit on the workshop page if you want it... Go ahead and do as you please. I don't need credit. Link to comment https://forums.kleientertainment.com/forums/topic/78020-fuelweavers-death-camera-lock-on-other-creatures/#findComment-911549 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