red1500z

  • Content Count

    19
  • Joined

  • Last visited

Community Reputation

0 Neutral

About red1500z

  • Rank
    Junior Member
...

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Enable
  1. Yes, but don't worry, I fixed it and managed to make it work. Thank you for answering.
  2. Friend, you are great, it works perfectly, thank you very much.
  3. I can't understand what happened (I think my code is a real spaghetti)
  4. I did what you told me but I think it did not work or more likely I did it wrong but thank you very much for the help (I leave you the code there in case you have done something wrong and I am sorry for the inconvenience) red1500.lua
  5. uff I can't find "fn" butt this is the code i am using red1500.lua
  6. Where in the code do I put it, I get lost very easily (and thanks for the help ) you mean something like that? local function onload(inst) inst:ListenForEvent("ms_respawnedfromghost", onbecamehuman) inst:ListenForEvent("ms_becameghost", onbecameghost) if inst:HasTag("playerghost") then onbecameghost(inst) else onbecamehuman(inst) end inst.OnLoad = function() onmoonphasechange(inst, GLOBAL.GetClock():GetMoonPhase()) end end (and thanks again)
  7. hello I am using a code to change the statistics of an edible item but on a server when crafting the item it crashes the code is this = if GLOBAL.TheNet and GLOBAL.TheNet:GetIsServer() then AddPrefabPostInit("masamaligna", function(inst) if GetPlayer().prefab == "red1500" then inst:AddComponent("edible") inst.components.edible.foodtype = MONSTERMEAT inst.components.edible.healthvalue = 90 end end) end Does anyone know how it can be fixed? please
  8. Hello I wanted to ask for help because I wanted to know how to make the transformation skin reload (this because when leaving the world and connecting again the character skin is not saved) i used this code local function onmoonphasechange(inst, phase) if not inst:HasTag("playerghost") then --only apply if the player is alive local health_max = 110 local damagemult = 1 if phase == "new" then health_max = 50 damagemult = 1.0 inst.components.locomotor.walkspeed = 4 inst.components.locomotor.runspeed = 7 inst.components.health:StartRegen(3 , 4) inst.sg:GoToState("electrocute") inst.AnimState:SetBuild("red1500") inst.components.talker:Say("me siento horrible", 2.5,true) local x, y, z = inst.Transform:GetWorldPosition() local fx = SpawnPrefab("maxwell_smoke") fx.Transform:SetPosition(x, y, z) elseif phase == "quarter" then health_max = 65 damagemult = 1 inst.components.locomotor.walkspeed = 8 inst.components.locomotor.runspeed = 8 inst.components.health:StartRegen(4 , 4) inst.sg:GoToState("electrocute") inst.AnimState:SetBuild("red1500moon") inst.components.talker:Say("hoy se asoma la luna", 2.5,true) local x, y, z = inst.Transform:GetWorldPosition() local fx = SpawnPrefab("maxwell_smoke") fx.Transform:SetPosition(x, y, z) elseif phase == "half" then health_max = 80 damagemult = 1.2 inst.components.locomotor.walkspeed = 9 inst.components.locomotor.runspeed = 9 inst.components.health:StartRegen(5 , 3) inst.sg:GoToState("electrocute") inst.AnimState:SetBuild("red1500moon1") inst.components.talker:Say("me siento extra├▒o", 2.5,true) local x, y, z = inst.Transform:GetWorldPosition() local fx = SpawnPrefab("maxwell_smoke") fx.Transform:SetPosition(x, y, z) elseif phase == "threequarter" then health_max = 95 damagemult = 1.3 inst.components.locomotor.walkspeed = 9 inst.components.locomotor.runspeed = 9 inst.components.health:StartRegen(6 , 3) inst.sg:GoToState("electrocute") inst.AnimState:SetBuild("red1500moon2") inst.components.talker:Say("mis propios huesos me lastiman", 2.5,true) local x, y, z = inst.Transform:GetWorldPosition() local fx = SpawnPrefab("maxwell_smoke") fx.Transform:SetPosition(x, y, z) elseif phase == "full" then damagemult = 1.5 inst.components.locomotor.walkspeed = 9 inst.components.locomotor.runspeed = 9 health_max = 110 inst.components.health:StartRegen(6 , 2) inst.sg:GoToState("electrocute") inst.AnimState:SetBuild("red1500moon3") inst.components.talker:Say("la luna llena es perfecta", 2.5,true) local x, y, z = inst.Transform:GetWorldPosition() local fx = SpawnPrefab("maxwell_smoke") fx.Transform:SetPosition(x, y, z) end --SetMaxHealth set the current health to the max, so use this workaround to keep the current percentage local health_percent = inst.components.health:GetPercent() inst.components.health:SetMaxHealth(health_max) inst.components.health:SetPercent(health_percent, true) --we do this check in case there are other multipliers applied local newdamagemult = (inst.components.combat.damagemultiplier or 1) / (inst.moonphasedamagemult or 1) * damagemult inst.components.combat.damagemultiplier = newdamagemult inst.moonphasedamagemult = damagemult end end
  9. hello I used this code from alainmcd and wanted to know if anyone knows any way for the character to change his skin (use google translator) --moon local function onmoonphasechange(inst, phase) if not inst:HasTag("playerghost") then --only apply if the player is alive local health_max = 150 local damagemult = 1 if phase == "new" then health_max = 50 damagemult = 0.8 elseif phase == "quarter" then health_max = 70 damagemult = 1 elseif phase == "half" then health_max = 90 damagemult = 1.2 elseif phase == "threequarter" then health_max = 110 damagemult = 1.3 elseif phase == "full" then damagemult = 1.5 health_max = 150 damagemult = 2 end --SetMaxHealth set the current health to the max, so use this workaround to keep the current percentage local health_percent = inst.components.health:GetPercent() inst.components.health:SetMaxHealth(health_max) inst.components.health:SetPercent(health_percent, true) --we do this check in case there are other multipliers applied local newdamagemult = (inst.components.combat.damagemultiplier or 1) / (inst.moonphasedamagemult or 1) * damagemult inst.components.combat.damagemultiplier = newdamagemult inst.moonphasedamagemult = damagemult end end
  10. thanks but is there a way to invoke them without the anchor?
  11. red1500 v2.rarthis is the folder I'm new to this so it must have a lot of mistakes
  12. hi, i made the follower fabricable but i don't know how to make it follow me do you know how to fix it?
  13. hello, I have a problem how can I make my friend use the original recipe of the object and I mine (because if I die my friends can't crawl telltales hearts (i using google translator)