playMaker

Author Topic: Customise String  (Read 1914 times)

hariprasadh10792

  • Playmaker Newbie
  • *
  • Posts: 8
Customise String
« 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.

TheBadFeeling

  • Junior Playmaker
  • **
  • Posts: 66
Re: Customise String
« Reply #1 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
« Last Edit: March 21, 2015, 10:07:08 AM by TheBadFeeling »
The Force is with you, young Playmaker – but you are not a C# senpai yet.

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Customise String
« Reply #2 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
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

hariprasadh10792

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Customise String
« Reply #3 on: March 22, 2015, 12:26:49 PM »
Thanks for the prompt reply! Works like a charm!