Thread: Just wondering.
View Single Post
  #1  
Old 08-01-2003, 10:46 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Just wondering.

Take a look at this code:

NPC Code:

//#CLIENTSIDE

if (created || timeout) {
this.h=textheight(.6,Courier New,b);
showtext 200,screenwidth-100,screenheight-this.h,Courier New,b,X:#v(playerx) Y: #v(playery);
changeimgcolors 200,1,1,1,1;
changeimgzoom 200,.6;
changeimgvis 200,4;
message #v(this.h);
timeout = .05;
}



I was testing textheight() yesterday,i understand how it work etc,but i can't figure out how the value is set,i mean,this.h returns 14,so what i want to know is how the calcule was made.

Quote:
textheight(zoom,font,style) calculates
the height of text displayed with the
given zoom factor, font name and style;
I read that at newfeatures,so,each font name and style has a determined value?
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote