Doodle Monster Posted August 26, 2025 Share Posted August 26, 2025 Hi! so as the title says I've run into a bit of a problem with my book Starcrushed. When Wendalyn reads the book and unstopable at the same time (Which spawns another FX on the player) Starcrushed dosen't properly vanish. I've tried Kill fx. that crashes my game, and I've tried readding the parent of the fx as nil which does work sometimes but othertimes the fx won't vanish. I'm pretty new to lua in the context of dst so any help would be really awesome! I'll attach the scripts file for Starcrushed let me know if you need any other files or such. Also since i'm a new user for some reason nobody gets notified when I reply, I tend to reply within 1-2 days at the latest so keep that in mind! local Assets = { -- Animation files for the item (showing it on the ground and swap symbols for the players). Asset("ANIM", "anim/wendalyn_book_damage_ground.zip"), -- Inventory image and atlas file used for the item. Asset("ATLAS", "images/inventoryimages/wendalyn_book_damage.xml"), Asset("IMAGE", "images/inventoryimages/wendalyn_book_damage.tex"), } local WENDALYNDAMAGE = 60 local function starcrushed_unproc(inst) if inst:HasTag("starcrushed") then inst:RemoveTag("starcrushed") inst._fx.entity:SetParent(nil) inst.components.talker:Say("Guess the starcrushing is over.") if inst._wendalyntimetask ~= nil then inst._wendalyntimetask:Cancel() end end if inst.components.combat ~= nil then --player.components.health.externalabsorbmodifiers:SetModifier(player, TUNING.BUFF_PLAYERABSORPTION_MODIFIER) inst.components.combat.damagemultiplier = 1 end end local function MainFunction() -- Functions which are performed both on Client and Server start here. local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() inst.entity:AddSoundEmitter() MakeInventoryPhysics(inst) -- Add minimap icon. Remember about its XML in modmain.lua! local minimap = inst.entity:AddMiniMapEntity() minimap:SetIcon("wendalyn_book_damage.tex") --[[ ANIMSTATE ]]-- -- This is the name visible on the top of hierarchy in Spriter. inst.AnimState:SetBank("wendalyn_book_damage_ground") -- This is the name of your compiled*.zip file. inst.AnimState:SetBuild("wendalyn_book_damage_ground") -- This is the animation name while item is on the ground. inst.AnimState:PlayAnimation("anim") --[[ TAGS ]]-- inst:AddTag("wendalyn_book_damage") inst:AddTag("book") inst:AddComponent("book") --[[affected players]]-- if you need this.... inst._ruins_proc_players={} inst.components.book.onread = function(inst, reader) reader:StartThread(function() local x,y,z = reader.Transform:GetWorldPosition() if true then --SanityCheck(caster) local range = 10 local must_tags = {"player"} local players = TheSim:FindEntities(x,y,z,range,must_tags) if players ~=nil then for key,player in pairs(players) do --[[forcefield buff]]-- i recommend making a buff inst with the new sosurce modifierlist system player:AddTag("starcrushed") if player._fx ~= nil then player._fx = nil end player._fx = SpawnPrefab("slingshotammo_purebrilliance_debuff_fx") player._fx.entity:SetParent(player.entity) player._fx.Transform:SetPosition(0, 0.2, 0) if player.components.combat ~= nil then player.components.combat.damagemultiplier = 1.25 player.components.talker:Say("Time to dish it out!") end player._wendalyntimetask = player:DoTaskInTime(WENDALYNDAMAGE, starcrushed_unproc) end end end end) reader.components.sanity:DoDelta(-35) return true end MakeInventoryFloatable(inst, "small", 0.05, {1.2, 0.75, 1.2}) inst.entity:SetPristine() if not TheWorld.ismastersim then -- If we're not the host - stop performing further functions. -- Only server functions below. return inst end inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "wendalyn_book_damage" inst.components.inventoryitem.atlasname = "images/inventoryimages/wendalyn_book_damage.xml" --new new code MakeHauntableLaunch(inst) return inst end return Prefab("wendalyn_book_damage", MainFunction, Assets) Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/ Share on other sites More sharing options...
FerniFrenito Posted August 29, 2025 Share Posted August 29, 2025 (edited) Try saving the fx instance (the return from SpawnPrefab) and removing it with fx_inst:Remove(). (fx_inst is the name of the variable that contains the fx instance, of course) Edited August 29, 2025 by FerniFrenito Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833263 Share on other sites More sharing options...
Doodle Monster Posted August 29, 2025 Author Share Posted August 29, 2025 Thanks! I'll take a look at it. Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833326 Share on other sites More sharing options...
Doodle Monster Posted August 29, 2025 Author Share Posted August 29, 2025 Oh, one more thing, do you know how I would get it to deactivate on players becomeing a ghost? Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833343 Share on other sites More sharing options...
Doodle Monster Posted August 29, 2025 Author Share Posted August 29, 2025 Hmm, I'm not entirely certain how returns work. Here's how I have it setup right now. The game freezes when trying to read starcrushed, so I know I did something wrong local Assets = { -- Animation files for the item (showing it on the ground and swap symbols for the players). Asset("ANIM", "anim/wendalyn_book_damage_ground.zip"), -- Inventory image and atlas file used for the item. Asset("ATLAS", "images/inventoryimages/wendalyn_book_damage.xml"), Asset("IMAGE", "images/inventoryimages/wendalyn_book_damage.tex"), } local WENDALYNDAMAGE = 60 local function starcrushed_unproc(inst) if inst:HasTag("starcrushed") then inst:RemoveTag("starcrushed") fx_inst:Remove("slingshotammo_purebrilliance_debuff_fx") inst.components.talker:Say("Guess the starcrushing is over.") if inst._wendalyntimetask ~= nil then inst._wendalyntimetask:Cancel() end end if inst.components.combat ~= nil then --player.components.health.externalabsorbmodifiers:SetModifier(player, TUNING.BUFF_PLAYERABSORPTION_MODIFIER) inst.components.combat.damagemultiplier = 1 end end local function MainFunction() -- Functions which are performed both on Client and Server start here. local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() inst.entity:AddSoundEmitter() MakeInventoryPhysics(inst) -- Add minimap icon. Remember about its XML in modmain.lua! local minimap = inst.entity:AddMiniMapEntity() minimap:SetIcon("wendalyn_book_damage.tex") --[[ ANIMSTATE ]]-- -- This is the name visible on the top of hierarchy in Spriter. inst.AnimState:SetBank("wendalyn_book_damage_ground") -- This is the name of your compiled*.zip file. inst.AnimState:SetBuild("wendalyn_book_damage_ground") -- This is the animation name while item is on the ground. inst.AnimState:PlayAnimation("anim") --[[ TAGS ]]-- inst:AddTag("wendalyn_book_damage") inst:AddTag("book") inst:AddComponent("book") --[[affected players]]-- if you need this.... inst._ruins_proc_players={} inst.components.book.onread = function(inst, reader) reader:StartThread(function() local x,y,z = reader.Transform:GetWorldPosition() if true then --SanityCheck(caster) local range = 10 local must_tags = {"player"} local players = TheSim:FindEntities(x,y,z,range,must_tags) if players ~=nil then for key,player in pairs(players) do --[[forcefield buff]]-- i recommend making a buff inst with the new sosurce modifierlist system player:AddTag("starcrushed") if player._fx ~= nil then player._fx = nil end player._fx = SpawnPrefab("slingshotammo_purebrilliance_debuff_fx") player._fx.entity:SetParent(player.entity) player._fx.Transform:SetPosition(0, 0.2, 0) if player.components.combat ~= nil then player.components.combat.damagemultiplier = 1.25 player.components.talker:Say("Time to dish it out!") return fx_inst() end player._wendalyntimetask = player:DoTaskInTime(WENDALYNDAMAGE, starcrushed_unproc) end end end end) reader.components.sanity:DoDelta(-35) return true end MakeInventoryFloatable(inst, "small", 0.05, {1.2, 0.75, 1.2}) inst.entity:SetPristine() if not TheWorld.ismastersim then -- If we're not the host - stop performing further functions. -- Only server functions below. return inst end inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "wendalyn_book_damage" inst.components.inventoryitem.atlasname = "images/inventoryimages/wendalyn_book_damage.xml" --new new code MakeHauntableLaunch(inst) return inst end return Prefab("wendalyn_book_damage", MainFunction, Assets) Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833346 Share on other sites More sharing options...
FerniFrenito Posted August 30, 2025 Share Posted August 30, 2025 (edited) On 8/29/2025 at 12:36 PM, Doodle Monster said: Oh, one more thing, do you know how I would get it to deactivate on players becomeing a ghost? Do you mean the player becomes instantly dead? On 8/29/2025 at 12:53 PM, Doodle Monster said: local function starcrushed_unproc(inst) if inst:HasTag("starcrushed") then inst:RemoveTag("starcrushed") fx_inst:Remove("slingshotammo_purebrilliance_debuff_fx") inst.components.talker:Say("Guess the starcrushing is over.") if inst._wendalyntimetask ~= nil then "SpawnPrefab" returns the, let's say, "object" that is doing the effect. So, to remove the effect, you just have to destroy that object, since it seems that object only serves to make the effect visible, so, since when you do player._fx = SpawnPrefab("slingshotammo_purebrilliance_debuff_fx") you are saving the object in the "_fx" variable inside "player", you can access it as long as you have access to the "player" variable. As far as I can see, in starcrushed_unproc(inst), "inst" is the "player" variable. So it would be enough to do local function starcrushed_unproc(inst) if inst:HasTag("starcrushed") then inst:RemoveTag("starcrushed") inst._fx:Remove() -- Delete the fx object inst._fx = nil -- I think it is not necessary to do this, but it is to always have control of what is in our variables -- ... rest of your code The game freeze because in inst:RemoveTag("starcrushed") fx_inst:Remove("slingshotammo_purebrilliance_debuff_fx") --- <-- fx_inst is null, doesn't exists inst.components.talker:Say("Guess the starcrushing is over.") I used "fx_inst" as an example referring to "fx instance". I'll try to explain what an instance is: let's imagine it as a set of blueprints. I give you the blueprints to build a machine. Those blueprints would be a class. The machine doesn't exist yet, right? It's simply a piece of paper with instructions. An instance is when you, following those blueprints, create the machine. Now the machine exists. You can follow the blueprints many times to create identical machines, but not the same ones (when you buy two bottles of the same soda, they look the same, but they're not the same bottle). Then, each instance of that machine will have its peculiarities. One may be painted blue, another green, one may have scratches, another may not work because they put something inside that shouldn't be there. I recommend you study a little what in programming is called Object-Oriented Programming (OOP), since Lua and the DST mods use OOP concepts all the time. I don't mean this in a bad way, it's just that it will be very difficult for you to program mods without knowing these concepts because it is what the entire game (and in general all games and programs) is based on. Edited August 30, 2025 by FerniFrenito Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833473 Share on other sites More sharing options...
Doodle Monster Posted August 30, 2025 Author Share Posted August 30, 2025 Thank you! Yeah, i've been takeing a class on lua. I just haven't gotten around to finishing it yet. Thank you so much for the help! Also, my other character Wramp has gone public on the workshop, if you like characters that are lore friendly I reccomend him! Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833483 Share on other sites More sharing options...
Doodle Monster Posted August 30, 2025 Author Share Posted August 30, 2025 Oh, about the ghost thing, The FX persists after the character dies. I'm not sure how to run the unproc function on death Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833484 Share on other sites More sharing options...
Doodle Monster Posted August 30, 2025 Author Share Posted August 30, 2025 Okay, I made the changes and they work. but i'm still haveing problems geting the proper fx to vanish. When Unstoppable ends it removed the pure brillance effect instead of the shield when used at the same time. I might have to come back to this later... Here's the current stuff I have for unstoppable local Assets = { -- Animation files for the item (showing it on the ground and swap symbols for the players). Asset("ANIM", "anim/wendalyn_book_shield_ground.zip"), -- Inventory image and atlas file used for the item. Asset("ATLAS", "images/inventoryimages/wendalyn_book_shield.xml"), Asset("IMAGE", "images/inventoryimages/wendalyn_book_shield.tex"), } local WENDALYNSHIELD = 20 local function ruinshat_unproc(inst) if inst:HasTag("forcefield") then inst:RemoveTag("forcefield") if inst._fx ~= nil then inst._fx:Remove("forcefieldfx") end if inst._task ~= nil then inst._task:Cancel() end end if inst.components.health ~= nil then --player.components.health.externalabsorbmodifiers:SetModifier(player, TUNING.BUFF_PLAYERABSORPTION_MODIFIER) inst.components.health:SetAbsorptionAmount(0) end end local function MainFunction() -- Functions which are performed both on Client and Server start here. local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() inst.entity:AddSoundEmitter() MakeInventoryPhysics(inst) -- Add minimap icon. Remember about its XML in modmain.lua! local minimap = inst.entity:AddMiniMapEntity() minimap:SetIcon("wendalyn_book_shield.tex") --[[ ANIMSTATE ]]-- -- This is the name visible on the top of hierarchy in Spriter. inst.AnimState:SetBank("wendalyn_book_shield_ground") -- This is the name of your compiled*.zip file. inst.AnimState:SetBuild("wendalyn_book_shield_ground") -- This is the animation name while item is on the ground. inst.AnimState:PlayAnimation("anim") --[[ TAGS ]]-- inst:AddTag("wendalyn_book_shield") inst:AddTag("book") inst:AddComponent("book") --[[affected players]]-- if you need this.... inst._ruins_proc_players={} inst.components.book.onread = function(inst, reader) reader:StartThread(function() local x,y,z = reader.Transform:GetWorldPosition() if true then --SanityCheck(caster) local range = 10 local must_tags = {"player"} local players = TheSim:FindEntities(x,y,z,range,must_tags) table.insert(inst._ruins_proc_players,players) if players ~=nil then for key,player in pairs(players) do --[[forcefield buff]]-- i recommend making a buff inst with the new sosurce modifierlist system player:AddTag("forcefield") if player._fx ~= nil then player._fx = nil end player._fx = SpawnPrefab("forcefieldfx") player._fx.entity:SetParent(player.entity) player._fx.Transform:SetPosition(0, 0.2, 0) if player.components.health ~= nil then player.components.health:SetAbsorptionAmount(.95) end player._task = player:DoTaskInTime(WENDALYNSHIELD, ruinshat_unproc) end end end end) reader.components.sanity:DoDelta(-35) return true end MakeInventoryFloatable(inst, "small", 0.05, {1.2, 0.75, 1.2}) inst.entity:SetPristine() if not TheWorld.ismastersim then -- If we're not the host - stop performing further functions. -- Only server functions below. return inst end inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "wendalyn_book_shield" inst.components.inventoryitem.atlasname = "images/inventoryimages/wendalyn_book_shield.xml" --new new code MakeHauntableLaunch(inst) return inst end return Prefab("wendalyn_book_shield", MainFunction, Assets) Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833487 Share on other sites More sharing options...
Doodle Monster Posted August 30, 2025 Author Share Posted August 30, 2025 And here's the current Starcrushed file local Assets = { -- Animation files for the item (showing it on the ground and swap symbols for the players). Asset("ANIM", "anim/wendalyn_book_damage_ground.zip"), -- Inventory image and atlas file used for the item. Asset("ATLAS", "images/inventoryimages/wendalyn_book_damage.xml"), Asset("IMAGE", "images/inventoryimages/wendalyn_book_damage.tex"), } local WENDALYNDAMAGE = 60 local function starcrushed_unproc(inst) if inst:HasTag("starcrushed") then inst:RemoveTag("starcrushed") inst._fx:Remove("slingshotammo_purebrilliance_debuff_fx") inst.components.talker:Say("Guess the starcrushing is over.") if inst._wendalyntimetask ~= nil then inst._wendalyntimetask:Cancel() end end if inst.components.combat ~= nil then --player.components.health.externalabsorbmodifiers:SetModifier(player, TUNING.BUFF_PLAYERABSORPTION_MODIFIER) inst.components.combat.damagemultiplier = 1 end end local function MainFunction() -- Functions which are performed both on Client and Server start here. local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() inst.entity:AddSoundEmitter() MakeInventoryPhysics(inst) -- Add minimap icon. Remember about its XML in modmain.lua! local minimap = inst.entity:AddMiniMapEntity() minimap:SetIcon("wendalyn_book_damage.tex") --[[ ANIMSTATE ]]-- -- This is the name visible on the top of hierarchy in Spriter. inst.AnimState:SetBank("wendalyn_book_damage_ground") -- This is the name of your compiled*.zip file. inst.AnimState:SetBuild("wendalyn_book_damage_ground") -- This is the animation name while item is on the ground. inst.AnimState:PlayAnimation("anim") --[[ TAGS ]]-- inst:AddTag("wendalyn_book_damage") inst:AddTag("book") inst:AddComponent("book") --[[affected players]]-- if you need this.... inst._ruins_proc_players={} inst.components.book.onread = function(inst, reader) reader:StartThread(function() local x,y,z = reader.Transform:GetWorldPosition() if true then --SanityCheck(caster) local range = 10 local must_tags = {"player"} local players = TheSim:FindEntities(x,y,z,range,must_tags) if players ~=nil then for key,player in pairs(players) do --[[forcefield buff]]-- i recommend making a buff inst with the new sosurce modifierlist system player:AddTag("starcrushed") if player._fx ~= nil then player._fx = nil end player._fx = SpawnPrefab("slingshotammo_purebrilliance_debuff_fx") player._fx.entity:SetParent(player.entity) player._fx.Transform:SetPosition(0, 0.2, 0) if player.components.combat ~= nil then player.components.combat.damagemultiplier = 1.25 player.components.talker:Say("Time to dish it out!") player._wendalyntimetask = player:DoTaskInTime(WENDALYNDAMAGE, starcrushed_unproc) end end end end end) reader.components.sanity:DoDelta(-35) return true end MakeInventoryFloatable(inst, "small", 0.05, {1.2, 0.75, 1.2}) inst.entity:SetPristine() if not TheWorld.ismastersim then -- If we're not the host - stop performing further functions. -- Only server functions below. return inst end inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "wendalyn_book_damage" inst.components.inventoryitem.atlasname = "images/inventoryimages/wendalyn_book_damage.xml" --new new code MakeHauntableLaunch(inst) return inst end return Prefab("wendalyn_book_damage", MainFunction, Assets) Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833488 Share on other sites More sharing options...
Doodle Monster Posted August 31, 2025 Author Share Posted August 31, 2025 The main issue right now is unstoppable and starcrushed are bugged when useing them at the same time. I can use one without the other with no issues as long as the durations don't overlap. When they overlap the fx dosen't properly vanish Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833574 Share on other sites More sharing options...
FerniFrenito Posted August 31, 2025 Share Posted August 31, 2025 1 hour ago, Doodle Monster said: The main issue right now is unstoppable and starcrushed are bugged when useing them at the same time. I can use one without the other with no issues as long as the durations don't overlap. When they overlap the fx dosen't properly vanish This is most likely because you're using the same variable to save both effects, so you lose the reference to one and it won't be deleted. To fix this, just change player._fx in one of the two to something like player._fx2 Although I would recommend making variables more descriptive. Something like player._unstoppable_fx player._starcrushed_fx You can make the variable names as long as you want, it doesn't really affect performance because when you run the code, no variable has a name, but rather they are stored in something more technical that is not relevant in this situation. Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833589 Share on other sites More sharing options...
Doodle Monster Posted August 31, 2025 Author Share Posted August 31, 2025 Thank you so much for the clarification! This helps a ton Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833612 Share on other sites More sharing options...
Doodle Monster Posted August 31, 2025 Author Share Posted August 31, 2025 Just tested it Works great, thank you! 1 Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1833614 Share on other sites More sharing options...
Doodle Monster Posted September 6, 2025 Author Share Posted September 6, 2025 @FerniFrenito I'm haveing some issues when reading unstopable twice, the current fx dosen't vanish and I've tried not spawning extra fx if the current fx ~= nil but that dosen't work. And i've tried removeing the extra fx if it exists when reading and that dosen't work either. Here's the current prefab file. local Assets = { -- Animation files for the item (showing it on the ground and swap symbols for the players). Asset("ANIM", "anim/wendalyn_book_shield_ground.zip"), -- Inventory image and atlas file used for the item. Asset("ATLAS", "images/inventoryimages/wendalyn_book_shield.xml"), Asset("IMAGE", "images/inventoryimages/wendalyn_book_shield.tex"), } local WENDALYNSHIELD = 20 local function ruinshat_unproc(inst) if inst:HasTag("forcefield") then inst:RemoveTag("forcefield") if inst._unstoppable_fx ~= nil then inst._unstoppable_fx:Remove("forcefieldfx") inst._unstoppable_fx = nil end if inst._task ~= nil then inst._task:Cancel() end end if inst.components.health ~= nil then --player.components.health.externalabsorbmodifiers:SetModifier(player, TUNING.BUFF_PLAYERABSORPTION_MODIFIER) inst.components.health:SetAbsorptionAmount(0) end end local function MainFunction() -- Functions which are performed both on Client and Server start here. local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() inst.entity:AddSoundEmitter() MakeInventoryPhysics(inst) -- Add minimap icon. Remember about its XML in modmain.lua! local minimap = inst.entity:AddMiniMapEntity() minimap:SetIcon("wendalyn_book_shield.tex") --[[ ANIMSTATE ]]-- -- This is the name visible on the top of hierarchy in Spriter. inst.AnimState:SetBank("wendalyn_book_shield_ground") -- This is the name of your compiled*.zip file. inst.AnimState:SetBuild("wendalyn_book_shield_ground") -- This is the animation name while item is on the ground. inst.AnimState:PlayAnimation("anim") --[[ TAGS ]]-- inst:AddTag("wendalyn_book_shield") inst:AddTag("book") inst:AddComponent("book") --[[affected players]]-- if you need this.... inst._ruins_proc_players={} inst.components.book.onread = function(inst, reader) reader:StartThread(function() local x, y, z = reader.Transform:GetWorldPosition() if true then -- SanityCheck(caster) local range = 10 local must_tags = {"player"} local players = TheSim:FindEntities(x, y, z, range, must_tags) table.insert(inst._ruins_proc_players, players) if players ~= nil then for key, player in pairs(players) do --[[forcefield buff]]-- i recommend making a buff inst with the new sosurce modifierlist system player:AddTag("forcefield") if inst._unstoppable_fx ~= nil then inst._unstoppable_fx:Remove("forcefieldfx") end player._unstoppable_fx = SpawnPrefab("forcefieldfx") player._unstoppable_fx.entity:SetParent(player.entity) player._unstoppable_fx.Transform:SetPosition(0, 0.2, 0) if player.components.health ~= nil then player.components.health:SetAbsorptionAmount(.95) end player._task = player:DoTaskInTime(WENDALYNSHIELD, ruinshat_unproc) end end end end) reader.components.sanity:DoDelta(-35) return true end MakeInventoryFloatable(inst, "small", 0.05, {1.2, 0.75, 1.2}) inst.entity:SetPristine() if not TheWorld.ismastersim then -- If we're not the host - stop performing further functions. -- Only server functions below. return inst end inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "wendalyn_book_shield" inst.components.inventoryitem.atlasname = "images/inventoryimages/wendalyn_book_shield.xml" --new new code MakeHauntableLaunch(inst) return inst end return Prefab("wendalyn_book_shield", MainFunction, Assets) Link to comment https://forums.kleientertainment.com/forums/topic/167722-help-with-player-fx-not-vanishing/#findComment-1834666 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