ELEMENTALCRAFTER009

  • Content Count

    67
  • Joined

  • Last visited

Community Reputation

9 Neutral

About ELEMENTALCRAFTER009

  • Rank
    Junior Member
...

Recent Profile Visitors

931 profile views
  1. Ah, okay. To change the character would I just change wilson in the AddPrefabPostinit to the desired character? And is there still a way to change the damage?
  2. Would this be for a specific character or for all characters? Also, is there a way to edit the projectile being fired as far as damage and effects? Edit: Variable AddAction is not declared
  3. This might be long depending the answer, but I was wondering if was possible to make it so that when nothing is equipped in the hands slot, you can fire a projectile similar to the fire staffs?
  4. The only problem left now is that it's not passing the onunequip at all. Edit: Also, do you know if is possible to increase the amount of loot every monster drops by a certain amount?
  5. [00:08:57]: [string "../mods/Trent - DST/scripts/prefabs/trent.l..."]:261: attempt to index local 'chest' (a nil value) Also, is that inst.spearstate = nil supposed to be at the top all by itself?
  6. Since I don't think you can change the tint of only the item, would it be possible to change the build of the player instead?
  7. I'm trying to modify the spear with certain traits (such as higher damage, a colored tint, and/or faster movement speed) when it's equipped with a specific amulet.
  8. Alright, now after rezecib got me on the right track, I ran into some confusion again with a more modified version of the code. local function onequip(inst, data) local item = data.item local chest = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.BODY) if item and item.prefab == "spear" and chest == nil then inst.components.talker:Say("I think I could modify this.") inst.AnimState:SetMultColour(2, 1, 1, 1) elseif item and item.prefab == "spear" and chest.name == "Life Giving Amulet" then inst.components.talker:Say("I feel somewhat more focused.") inst:RemoveComponent("finiteuses") inst.AnimState:SetMultColour(2, 1, 1, 1) elseif item and item.prefab == "spear" and chest.name == "Chilled Amulet" then inst.components.talker:Say("I feel somewhat more quick.") inst:RemoveComponent("finiteuses") inst.AnimState:SetMultColour(1, 1, 2, 1) elseif item and item.prefab == "spear" and chest.name == "Nightmare Amulet" then inst.components.talker:Say("I feel somewhat more insecure.") inst:RemoveComponent("finiteuses") inst.AnimState:SetMultColour(2, 1, 2, 1) elseif item and item.prefab == "spear" and chest.name == "Magiluminescence" then inst.components.talker:Say("I feel somewhat more vibrant.") inst:RemoveComponent("finiteuses") inst.AnimState:SetMultColour(2, 2, 1, 1) elseif item and item.prefab == "spear" and chest.name == "The Lazy Forager" then inst.components.talker:Say("I feel somewhat more efficient.") inst:RemoveComponent("finiteuses") inst.AnimState:SetMultColour(2, 1.5, 1, 1) elseif item and item.prefab == "spear" and chest.name == "Construction Amulet" then inst.components.talker:Say("I feel somewhat more intelligent.") inst:RemoveComponent("finiteuses") inst.AnimState:SetMultColour(1, 2, 1, 1)end end How would you set which item it's applying the effects to?
  9. local function onequip(inst, owner) if ThePlayer.prefab == "trent" then inst:AddTag("sharp") inst:AddComponent("weapon") inst.components.weapon:SetDamage(55)end endlocal function onunequip(inst, owner) inst:RemoveTag("sharp") inst:RemoveComponent("weapon")endDo I have the right idea here?
  10. I am adding this AddPrefabPostinit to my modmain AddPrefabPostInit("diviningrod", function(inst)if GLOBAL.GetPlayer().prefab == "trent" then inst:AddTag("sharp") inst:AddComponent("weapon") inst.components.weapon:SetDamage(55)endend)and it gives me this error [00:01:20]: error calling PrefabPostInit: diviningrod in mod Trent - DST (Trent Character): [string "../mods/Trent - DST/modmain.lua"]:67: attempt to index a nil valueWhat am I doing wrong?
  11. How would I be able to run this function client-side only? local function FormVision(inst, phase) if inst.trentform and phase == "night" then inst.entity:AddLight() inst.Light:SetFalloff(0.5) inst.Light:SetIntensity(0.9) inst.Light:SetRadius(15) inst.Light:SetColour(245/255,255/255,245/255) inst.Light:Enable(true) else inst.Light:Enable(false) endend