Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (AndrewAMD), 16,038 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Display the sentence #172515
12/12/07 15:15
12/12/07 15:15
Joined: Sep 2007
Posts: 80
R
ruchen Offline OP
Junior Member
ruchen  Offline OP
Junior Member
R

Joined: Sep 2007
Posts: 80
I want to display a sentence on my screen,but I want to display it word by word.
How can I do that?My idea is that I use the window definition in c-script and make the bitmap slide from left to right,then the sentence can display word by word.But I don't think it's a good method,do you have good methods,my friends?

Re: Display the sentence [Re: ruchen] #172516
12/12/07 19:10
12/12/07 19:10
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
Here is an example code for displaying sentence char by char :
Code:

var i;
STRING tempString1;
STRING tempString2;
STRING sentence = "Hello, World!!";

text showText
{
pos_x = 10;
pos_y = 10;
string tempString1;
flags = visible;

}
function main()
{
i = str_len(sentence);
while(i > 0)
{
i -= 1;
str_cpy(tempString2,sentence);
str_cpy(tempString1,str_trunc(tempString2,i));
sleep(0.5);
}
}



If you want to display word by word, may be look up "file_str_????"
in the manual.

Re: Display the sentence [Re: vlau] #172517
12/13/07 03:00
12/13/07 03:00
Joined: Sep 2007
Posts: 80
R
ruchen Offline OP
Junior Member
ruchen  Offline OP
Junior Member
R

Joined: Sep 2007
Posts: 80
Yes,this method is very good.And if the sentence is chinese ,I can display it word by word through:i -= 2;
Thank you!


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1