how can i change what's written?

Talk about making games.

how can i change what's written?

Postby Sondise » Tue Dec 18, 2007 3:50 am

For example, there's a count: 00 crystals colected.
When a new crystal is colected, it changes to: 01 crystal colected.
I added 1 but i didn't get to change "crystals colected" to "crystal colected". A "s" doesn't matter a lot, but I'd like to do it :D
User avatar
Sondise
 
Posts: 94
Joined: Thu Nov 01, 2007 11:04 pm
Location: South america
Score: 0 Give a positive score

Re: how can i change what's written?

Postby Spidy » Tue Dec 18, 2007 8:15 am

First Create Actor crystaltext=go to Actor controlpanel =Text=write 00
then go to crystal Actor Controlpanel=Add=Collision=Anyside of Player=Destroy Actor then Add event=Destroy Actor=Script Editor
write this

crystaltext.textNumber = crystaltext.textNumber +1;


OK
Image
VOTE FOR MY SIGNATURE PLEASE.......THANK YOU
User avatar
Spidy
 
Posts: 935
Joined: Tue Aug 14, 2007 1:28 pm
Location: http://www.inatonibai.com
Score: 38 Give a positive score

Re: how can i change what's written?

Postby asmodeus » Tue Dec 18, 2007 1:10 pm

But first you should write this in a create actor event, because the text (00) is only a text and no number.
Code: Select all
textNumber = 00;

If you didn't do so, the count will be 00 when you collected your first crystal.
User avatar
asmodeus
 
Posts: 483
Joined: Thu Oct 11, 2007 5:04 pm
Location: Germany
Score: 43 Give a positive score

Re: how can i change what's written?

Postby Sondise » Tue Dec 18, 2007 1:28 pm

My problem is not the 00 to 01, I already got to it. The problem is to change the text "crystals colected" to "crystal colected" :D
User avatar
Sondise
 
Posts: 94
Joined: Thu Nov 01, 2007 11:04 pm
Location: South america
Score: 0 Give a positive score

Re: how can i change what's written?

Postby asmodeus » Tue Dec 18, 2007 1:41 pm

Use this script:
Code: Select all
strcpy(text, "crystal colected");

With strcpy you can change strings (texts).
User avatar
asmodeus
 
Posts: 483
Joined: Thu Oct 11, 2007 5:04 pm
Location: Germany
Score: 43 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron