playMaker

Author Topic: Help! Change texts with playmaker  (Read 138 times)

MatiasHarder

  • Playmaker Newbie
  • *
  • Posts: 47
    • View Profile
Help! Change texts with playmaker
« on: August 21, 2017, 09:56:18 AM »
Hello, I would like you to orient me to know how I can change a text of the UI with numbers.

Example 1:
Place a text that appears 1 and every second go up to 100.

Example 2:
Place a text with the number 50 and each second increase 10+.

How can I make it possible?

tcmeric

  • Sr. Member
  • ****
  • Posts: 480
    • View Profile
Re: Help! Change texts with playmaker
« Reply #1 on: August 21, 2017, 10:23:48 AM »
Hi. First you need to setup the numbers.

State 1
1. Wait for x amount of time, ie 1 second. Action: Wait. On finish, go to state 2.

State 2
2. Int variable. Action: Int add.
3. You need to convert the int to a string. Only strings can be displayed. Action: convert int to string.
4. You need to display it. Make a uGUI canvas with some text. Next, to change it with playmaker. From the ecosystem, download the ugui actions package. Then use the action: set ugui text (I think that is the name).
5. Check to see if your number has reached 100 (or 50). Use action: Int compare. If equal or greater than 100 (or 50), then go to a third state (maybe called finished). If less than, go back to state 1.

State 3
Empty state for finish.


« Last Edit: August 21, 2017, 10:25:29 AM by tcmeric »

MatiasHarder

  • Playmaker Newbie
  • *
  • Posts: 47
    • View Profile
Re: Help! Change texts with playmaker
« Reply #2 on: August 21, 2017, 12:40:58 PM »
Wow thank you very much :D It helped me a lot