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 10-24-2009, 03:17 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
findImg, style, and a loop

I'm rewriting Era's nickname system, and the code I'm using the show the nickname is:

PHP Code:
  with (findImg(i)) {
    
nick_x;
    
nick_y;
    
    
layer 1;
    
zoom thiso.nickZoom;
    
    
text nick;
    
textshadow true;
    
shadowcolor obj.tmp.nick_shadow;
    
    
font $pref::graal::defaultfontname;
    
style "bc";
  } 
However, the problem is that it will display the style as "bc" (bold and centered) for the first frame (0.05 second loop), then after that, it will always act as if no style is set (not bold, not centered). If I only run the first frame, it will stay bold and centered.

I've found I can place hideimg(i) before re-showing the image, but I'd like to avoid this as it shouldn't be needed.

This code, however, works flawlessly:

PHP Code:
  showText(inick_xnick_y$pref::graal::defaultfontname"bc"nick); 
Help?
__________________
Reply With Quote
  #2  
Old 10-24-2009, 03:36 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Try this perhaps: Replace 'style', 'text', and 'font' with this:

PHP Code:
code $pref::graal::defaultfontname "@bc@" text
I haven't tested it, but I believe that showText still uses code to display itself.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #3  
Old 10-24-2009, 03:52 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
I just found the problem, it was, of course, my fault .

I misspelled $pref::graal::defaultfontsize when doing

PHP Code:
this.nickZoom $pref::graal::defaultfontsize 24
which was causing it to try to show at 0 zoom (it capped at like .1 or so) and apparently caused some other problems. It's working now.

Oops, thanks anyway, though <3.
__________________
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 08:58 AM.


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