Gamestudio Links
Zorro Links
Newest Posts
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (ApprenticeInMuc, Quad, TipmyPip), 7,096 guests, and 19 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Geir, ondrej, mredit, vestriaa, Lukudo
19206 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