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 09-02-2002, 12:00 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
wraptext2 is freezing players...

I'm not sure what the problem is, but people get frozen during the character setup stuff on my PW. The reason is because I use wraptext2, or that is what I was told by Angel when she checked into it. There is an alternative to using wraptext2, but I want to keep my NPCs tidy and easy for me to go back and make changes on the fly.

This is a small section from part of my character setup stuff:

NPC Code:
  wraptext2 imgwidth(dk_window.png)-16,1,,@Trebuchet MS@Use the Arrow Keys to choose a JobClass. Press A to accept it. You must pick 3.;
for (i=0; i<tokenscount; i++) {
showimg 202+i,@Trebuchet MS@#t(i),(screenwidth/2)-191+16,(screenheight/2)+(i*18)-60;
showimg 302+i,@Trebuchet MS@#t(i),(screenwidth/2)-190+16,(screenheight/2)+(i*18)-59;
changeimgcolors 302+i,0,0,0,1;
changeimgzoom 202+i,1;
changeimgzoom 302+i,1;
changeimgvis 202+i,5;
changeimgvis 302+i,4;
}



Strange thing is, even on my crappy laptop, I didn't freeze...well, there were occasions where I used wraptext2 for something else and it made Graal freeze. :x But its otherwise never done that during character setup for me.
__________________
Reply With Quote
  #2  
Old 09-02-2002, 12:16 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
perhaps its because the image hasn't loaded into the memory yet? Thus makeing your wraptext size a negitive number and making a near infinite (or negitive, just as bad) number of tokens. I would make it more defined.

like
NPC Code:

this.width = (imgwidth(dk_window.png)-16 > 0? imgwidth(dk_window.png)-16 : 128);
wraptext2 this.width,1,,@Trebuchet MS@Use the Arrow Keys...etc;



Or maybe just put in the acual width of dk_window.png, since its never gunna change anyway. (I would recommend this option over the previous)
__________________

subliminal message: 1+1=3

Last edited by Falcor; 09-02-2002 at 12:28 PM..
Reply With Quote
  #3  
Old 09-02-2002, 12:40 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by Falcor
perhaps its because the image hasn't loaded into the memory yet? Thus makeing your wraptext size a negitive number and making a near infinite (or negitive, just as bad) number of tokens. I would make it more defined.

like
NPC Code:

this.width = (imgwidth(dk_window.png)-16 > 0? imgwidth(dk_window.png)-16 : 128);
wraptext2 this.width,1,,@Trebuchet MS@Use the Arrow Keys...etc;



Or maybe just put in the acual width of dk_window.png, since its never gunna change anyway. (I would recommend this option over the previous)
I think I'll do the later...I should know better than to use imgwidth/imgheight since I have to load the image first. Thanks
__________________
Reply With Quote
  #4  
Old 09-02-2002, 08:49 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Clean your PM box
__________________

subliminal message: 1+1=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 05:49 AM.


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