Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Text zoom limit? (https://forums.graalonline.com/forums/showthread.php?t=134264425)

greggiles 08-31-2011 07:07 AM

Text zoom limit?
 
I am drawing text and I'm useing the this.zoom to set the size. (this zoom is not actual script, just the function used) Anyway, it seems the max zoom i believe is 5 ( zoom = 5). If i go past that, the size wont change. Yet, for images, i can make the value as large as i want. Is there a limit on the zoom for txt? And if so, is there a way to get past it?

furry_mougle 08-31-2011 07:30 AM

The max zoom goes over 5...

greggiles 08-31-2011 07:42 AM

Yes i know. Like i said, it works for imgs, but when i try and go past 5 for txt, it doesnt work

furry_mougle 08-31-2011 08:18 AM

Quote:

Originally Posted by greggiles (Post 1666353)
Yes i know. Like i said, it works for imgs, but when i try and go past 5 for txt, it doesnt work

I was referring to text.

greggiles 08-31-2011 08:54 AM

Well what specific script are you useing. Maby im not useing the right one, or most efficient one. Correct me if im wrong, there are multiple ways to write it.

SoundFreak 08-31-2011 12:33 PM

Same issue. I can only go up to 2 though.

greggiles 08-31-2011 12:51 PM

Maby mine only goes to 2 too. Im just getting dilusional with frustration.

fowlplay4 08-31-2011 02:53 PM

Why don't you just adjust the font-size?

DustyPorViva 08-31-2011 03:17 PM

Might want to reconsider anyways. Larger font rendering is a lot more intensive. Do you really need to be rendering a font that large?

blackbeltben 08-31-2011 04:20 PM

Quote:

Originally Posted by fowlplay4 (Post 1666401)
Why don't you just adjust the font-size?

can you give an example please?

fowlplay4 08-31-2011 04:27 PM

I don't believe you can do it with a normal showimg, but it should work with GUIs.

PHP Code:

//#CLIENTSIDE
function onCreated() {
  new 
GuiTextCtrl("TxtObject") {
    
profile GuiBlueTextProfile;
    
useownprofile true;
    
profile.fontsize 72;
    
100;
    
text "Large text";
  }


You should explain why you need the large text to begin with because there's probably a better solution for your problem.

blackbeltben 08-31-2011 05:01 PM

We (as in greggiles and I) are making a simple script where when you press "E", it displays your EXP. And then hides and blablabla. The script works fine, the only issue is that we want the numbers bigger bigger BIGGER

Here's the section that I'm assuming needs editing

PHP Code:

 showText(24170230$pref::graal::defaultfontname"c""" @(player.clientr.exp));
 
changeImgColors(2411111);
  
findImg(241).zoom 5;
  
changeImgVis(24115); 


fowlplay4 08-31-2011 05:27 PM

You're putting it on a screen layer (>=4) so you can definitely use GUI Objects to accomplish that instead of using zoom and a showimg object.

I question the necessity of obscenely large text to display a single value though.

0PiX0 08-31-2011 05:34 PM

Simple work-around:
PHP Code:

with (textimage) {
  
stretchx 5;
  
stretchy 5;


However, it turns into a blurry mess.

DustyPorViva 08-31-2011 05:35 PM

If it's just numbers for experience you could use bitmap fonts instead. Also lets you apply more complex things(such as outlines, gradients to the text) and overall better appeal. It's fairly simple to script as well.


All times are GMT +2. The time now is 02:59 AM.

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