generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: calculating Body heat based on enviorment (roblox)

Previous Thread :: Next Thread 
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
25 Sep 2011 03:33 PM
what i have is a NumberValue which is changed daily and represents the current temperature, but i can't come up with a decent formula for heat loss. heres what i have so far(very inaccurate :P):

local user = game.Players.LocalPlayer
while wait(.5) do
local OutsideTemp = Workspace.Temp.Value -- the outside temp
local checkTemp = OutsideTemp
local Heat = .1 -- random number i set for heat produced by the body
local internal = 98.6 -- the body temp
local time = 0 -- time exposed in the current temperature
time = time +1
if Outside < checkTemp or Outside > checkTemp then --to reset the time if temperature changes
time = 0
end
for i,v in pairs(game.Workspace:GetChildren()) do
if v.Name == "CFire" then
local mag = (user.Character.Torso.Position - v.Base.Position).magnitude
if mag <= 8 then -- checking if there is a Campfire with in range.
local fireHeat = OutsideTemp
checkTemp = checkTemp + 5 -- warmth :D
end
end
end
local temp = some calculations here to get the new bodytemperature
print(temp)
end
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
25 Sep 2011 07:31 PM
bawmp
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
25 Sep 2011 08:03 PM
i need some one smart and rather bored to help me out here....
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
25 Sep 2011 08:37 PM
I didn't read your script but just do something like

while Wait() do
bodytemp=bodytemp+(0.01*(outsidetemp-bodytemp));
end
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
25 Sep 2011 08:44 PM

Flat Surface Heat Loss Calculations.
The term “heat loss” commonly refers to the heat transfer of an object to its ambient environment. This implies that the object in question -- a wall, for example -- is at a temperature above the ambient temperature (figure 2). Mathematically, the formula for calculating the heat loss of a system through conduction, expressed in BTU/hour is:

Q = (U)(A)(T)

where
U is the conductance, BTU/(ft2)(oF)(hr)
A is the surface area of object, ft2
ΔT is the temperature difference (T1 -T2), oF
Conductance is the inverse of resistance, R, and can be expressed as U = 1/R or U = k/L. Therefore, another way to express the basic heat loss (Q) is:

Q = [(k)(A)( ΔT)(1.1)] / L Heat Loss, BTU/hr

k is the object's specific heat.



~ pwnedu46 ~
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
25 Sep 2011 08:45 PM
Yes, I copy and pasted that. It's amazing what google can do. :3


~ pwnedu46 ~
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
25 Sep 2011 08:46 PM
@pwnedu

I liek ur cpoy and paster.
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
26 Sep 2011 04:05 PM
lol, i was reading a simular article and i was liek "ok, this is doable..." *10 min later* "To many factors and calculations! D:". anyways... thanks for the help i think what you all gave me should be good enough to get me started.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image