Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: hariprasadh10792 on March 21, 2015, 06:37:56 AM

Title: Customise String
Post by: hariprasadh10792 on March 21, 2015, 06:37:56 AM
Hi
I am trying to create a customised string while Im displaying the score to the players. The score will be changed based on how many points the player has scored the remaining text will constantly remain the same.

Eg: You have scored "x" number of points.
I need the value of x to be dynamic. Is it possible to do in playmaker.
Title: Re: Customise String
Post by: TheBadFeeling on March 21, 2015, 10:05:10 AM
You'll need to convert your score to a string and use Build String to piece things together. But then you can do it like
"You have scored " + myScoreConvertedToText + " points!"

/Bad
Title: Re: Customise String
Post by: sebaslive on March 21, 2015, 10:16:30 AM
You can also use Convert Float To String.

In the format box put: You have scored 0 number of points.
And set your float variable as the number of points you have scored and it should work.

For more information on string formats just look at this link:
http://www.dotnetperls.com/string-format (http://www.dotnetperls.com/string-format)
Title: Re: Customise String
Post by: hariprasadh10792 on March 22, 2015, 12:26:49 PM
Thanks for the prompt reply! Works like a charm!