Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-10-2007, 03:53 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Bmi

I'm script some super secret funny script that I'll post later but I need for the player to calculate there BMI so I went to the "Massive Encyclopedia Online" Which Is Kinda Irritating because I can't say the name of the site do to the rule. Anyways the formula is weight/height^2 then multiply by 703, but when I do this I get some outlandish number which is definitely not BMI. Weight is in pounds and height is in inches

BMI = Body Mass Index, btw

Anyone know a real formula for BMI?
__________________
Deep into the Darkness peering...
Reply With Quote
  #2  
Old 06-10-2007, 03:58 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
BMI = (weight*703)/height²

I can't post the reference site though, PM me if you'd like to know.
Reply With Quote
  #3  
Old 06-10-2007, 04:16 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Afraid this doesnt work, I used a BMI calculator site and input this

height 6'4" = 76in
weight = 238 lbs

professional calc got this for the BMI : 28.9671052632

i tried both methods found

Method 1 : (weight/height^2) * 703 BMI got : 41828.5

graal formula
PHP Code:
(this.weight/this.height^2) * 703
Method 2 : (weight *703)/height^2 BMI got : 13357

graal formula
PHP Code:
(this.weight*703)/this.height^2
what am I doing wrong :[
__________________
Deep into the Darkness peering...
Reply With Quote
  #4  
Old 06-10-2007, 04:23 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Dunno, but I just inputted into a calculator(regular, used the formula) and got 28.96710...
Try, (this.weight*703)/(this.height^2); ?
Reply With Quote
  #5  
Old 06-10-2007, 04:36 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
nope

dont know if this will help any :/
PHP Code:
 this.weight Weight_Edit_Text.getText();
 
this.height Height_Edit_Text.getText();
 
this.BMI1 = (this.weight*703)/(this.height^2);
 
BMI_Text.setText("Your BMI is : " this.BMI1); 
__________________
Deep into the Darkness peering...
Reply With Quote
  #6  
Old 06-10-2007, 04:46 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
No idea, I used the formula in a calculator myself and it worked.
Try defining the numbers in the variables yourself without the getText and such? And also, I didn't mention it, but the height must be in inches.
Reply With Quote
  #7  
Old 06-10-2007, 04:49 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
yeah, I'm using 76 as inches which is 6"4' I'll in a sec

FIXED!!! Thanks Dusty for your help, I changed this.height to this.height1, I think this.height is set somewhere else but I couldn't find it :P
__________________
Deep into the Darkness peering...
Reply With Quote
  #8  
Old 06-10-2007, 05:06 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Hmm, ya, I think this.height might be predefined, I forgot all about that.
Reply With Quote
  #9  
Old 06-11-2007, 09:36 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
this.height would be the height variable for what ever object you are in. It seems you were probably in a GUI control judging by your script so that would be the control's height
__________________
Do it with a DON!
Reply With Quote
  #10  
Old 06-11-2007, 01:47 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
Quote:
Originally Posted by Angel_Light View Post

height 6'4" = 76in
weight = 238 lbs

professional calc got this for the BMI : 28.9671052632
That's not healthy, just so you know.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.