Aurorus

  • Content count

    16
  • Joined

  • Last visited

Community Reputation

4 Neutral

About Aurorus

  • Rank
    Junior Member
  1. Low health abillty

  2. Low health abillty

    good idea ryuty.lua
  3. Low health abillty

    local MakePlayerCharacter = require "prefabs/player_common" local assets = { Asset("SCRIPT", "scripts/prefabs/player_common.lua"), } local prefabs = {} -- Custom starting inventory local start_inv = { } -- When the character is revived from human local function onbecamehuman(inst) -- Set speed when not a ghost (optional) inst.components.locomotor:SetExternalSpeedMultiplier(inst, "ryuty_speed_mod", 1.4) end local function onbecameghost(inst) -- Remove speed modifier when becoming a ghost inst.components.locomotor:RemoveExternalSpeedMultiplier(inst, "ryuty_speed_mod") end -- When loading or spawning the character 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 end --For Rage Function local function make_big(inst) if inst.is_big == nil or not inst.is_big then inst.Transform:SetScale(1.4, 1.4, 1.4) inst.components.combat.damagemultiplier = 1.5 inst.components.hunger.hungerrate = 2 * TUNING.WILSON_HUNGER_RATE inst.is_big = true end end local function make_normal(inst) if inst.is_big == nil or inst.is_big then inst.Transform:SetScale(0.8, 0.8, 0.8) inst.components.combat.damagemultiplier = 1 inst.components.hunger.hungerrate = 1 * TUNING.WILSON_HUNGER_RATE inst.is_big = false end end local function change_size_by_health(health_percent) if health_percent < 0.5 then make_big() else make_normal() end end local function onload(inst, data) -- Instantly do health and size check, and possible size change depending on current health. -- Call may need to be wrapped in DoTaskInTime as such, to wait for health component values to be loaded: --DoTaskInTime(0, change_size_by_health(inst.components.health:GetPercent())) change_size_by_health(inst.components.health:GetPercent() -- Set up a call to check for a size change whenever health changes. )inst:ListenForEvent("healthdelta", function(inst, data) change_size_by_health(data.newpercent) end) end -- This initializes for both the server and client. Tags can be added here. local common_postinit = function(inst) inst.Transform:SetScale(0.8, 0.8, 0.8) -- Minimap icon inst.MiniMapEntity:SetIcon( "ryuty.tex" ) end -- This initializes for the server only. Components are added here. local master_postinit = function(inst) -- choose which sounds this character will play inst.soundsname = "willow" -- Uncomment if "wathgrithr"(Wigfrid) or "webber" voice is used --inst.talker_path_override = "dontstarve_DLC001/characters/" -- Stats inst.components.health:SetMaxHealth(125) inst.components.hunger:SetMax(175) inst.components.sanity:SetMax(175) inst.components.temperature.inherentinsulation =(45) inst.components.health.fire_damage_scale = 2 -- Damage multiplier (optional) inst.components.combat.damagemultiplier = 1 -- Hunger rate (optional) inst.components.hunger.hungerrate = 1 * TUNING.WILSON_HUNGER_RATE --Heterochromia System inst:ListenForEvent("locomote", function(inst) if inst:HasTag("playerghost") then return end local dir = inst.Transform:GetRotation() local camera_rot = TheCamera:GetHeadingTarget() if camera_rot < 0 then camera_rot = camera_rot + 360 end if camera_rot == 0 or camera_rot == 45 then if dir <= 0 then inst.AnimState:SetBuild("ryuty_right") else inst.AnimState:SetBuild("ryuty_left") end elseif camera_rot == 90 or camera_rot == 135 then if math.abs(dir) >= 90 then inst.AnimState:SetBuild("ryuty_right") else inst.AnimState:SetBuild("ryuty_left") end elseif camera_rot == 180 or camera_rot == 225 then if dir >= 0 then inst.AnimState:SetBuild("ryuty_right") else inst.AnimState:SetBuild("ryuty_left") end else if math.abs(dir) <= 90 then inst.AnimState:SetBuild("ryuty_right") else inst.AnimState:SetBuild("ryuty_left") end end end) inst.OnLoad = onload inst.OnNewSpawn = onload end return MakePlayerCharacter("ryuty", prefabs, assets, common_postinit, master_postinit, start_inv)
  4. Low health abillty

    Still i get bug splat Im not good in lua
  5. Low health abillty

    It can works but when i choose character i get bug splat
  6. Low health abillty

    thanks it working but im still have problem with else my code looks like local function onload(inst, data) inst:ListenForEvent("healthdelta", function(inst, data) if data.oldpercent > data.newpercent then if data.newpercent < 0.5 then inst.Transform:SetScale(1.4, 1.4, 1.4) inst.components.combat.damagemultiplier = 1.5 inst.components.hunger.hungerrate = 2 * TUNING.WILSON_HUNGER_RATE else inst.Transform:SetScale(0.8, 0.8, 0.8) inst.components.combat.damagemultiplier = 1 inst.components.hunger.hungerrate = 1 * TUNING.WILSON_HUNGER_RATE end end end) end But character dont change instantly
  7. Low health abillty

    i have problem with this cuz if my character life is lower than 90% (i using this for test) i got error
  8. Low health abillty

    I think about more damage and size but sanity negative aura
  9. I want make abillity for my character what can be activated with low HP Current Code: --For Rage Function local function healthcontrol(inst, data) if inst.components.health.current <= 100 then inst.components.talker:Say("Test") inst.AddTag("rage") end end Anyone can help?
  10. How can i make custom fuel type I think about silk as a fuel type
  11. I cant find nightmare amulet in files idk name of this