Page 1 of 1

how can i change what's written?

PostPosted: Tue Dec 18, 2007 3:50 am
by Sondise
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

Re: how can i change what's written?

PostPosted: Tue Dec 18, 2007 8:15 am
by Spidy
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

Re: how can i change what's written?

PostPosted: Tue Dec 18, 2007 1:10 pm
by asmodeus
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.

Re: how can i change what's written?

PostPosted: Tue Dec 18, 2007 1:28 pm
by Sondise
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

Re: how can i change what's written?

PostPosted: Tue Dec 18, 2007 1:41 pm
by asmodeus
Use this script:
Code: Select all
strcpy(text, "crystal colected");

With strcpy you can change strings (texts).