Jump to content

[quick tiny question ;w;] body heat


Recommended Posts

say 

i'm using this code to prevent my self from getting attacked by charlie due giving my self faint light also to keep the peeps whom super close to me safe 

Quote

    inst.entity:AddLight()
    inst.Light:Enable(true)
    inst.Light:SetRadius(.85)
    inst.Light:SetFalloff(0.5)
    inst.Light:SetIntensity(.1)
    inst.Light:SetColour(255 / 255, 255 / 255, 236 / 255)

so i was thinking

is it possible to make him not only making light but making him self warm like a camp fire ? 

with a really short radius just like the one above

like to keep others warm when their close to him 

is such thing possible x_x; ?

for example making him like a living thermal stone 

hope you understand what i mean Dx

 

the code above is for light 

i'm looking for one that produce head like a thermal stone and make anyone around the character feel warm 

*i plan to make a fire character so i need that*

the heat is only to make them warm not burning o-o

Edited by Kronas
Link to comment
Share on other sites

I hope you still need it.

Try something like this :

 


    inst:AddComponent("heater")
    inst.components.heater.heatfn = GetHeatFn
local function GetHeatFn(inst)
    return 20
end

I don't know where to place the first part in a character prefab exactly, but do some test and see if it works.

Link to comment
Share on other sites

On 7/25/2017 at 11:49 AM, Lumina said:

I hope you still need it.

Try something like this :

 



    inst:AddComponent("heater")
    inst.components.heater.heatfn = GetHeatFn

local function GetHeatFn(inst)
    return 20
end

I don't know where to place the first part in a character prefab exactly, but do some test and see if it works.

yea ;w; i sure do

Link to comment
Share on other sites

On 7/25/2017 at 1:49 AM, Lumina said:

I hope you still need it.

Try something like this :

 



    inst:AddComponent("heater")
    inst.components.heater.heatfn = GetHeatFn

local function GetHeatFn(inst)
    return 20
end

I don't know where to place the first part in a character prefab exactly, but do some test and see if it works.

put this above common postinit function

local function GetHeatFn(inst)

return 20

end

 

put this in your masterpost init function

inst:AddComponent("heater")

inst.components.heater.heatfn = GetHeatFn

Edited by RedHairedHero
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...