playMaker

Author Topic: [SOLVED] Collectables  (Read 3132 times)

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
[SOLVED] Collectables
« on: April 15, 2012, 02:37:56 AM »
What action should i use to increase my GUI text by 1 every time an item is collected.

The way im doing it just now, just sets the value too 1?

Comments appreciated!
« Last Edit: April 15, 2012, 06:19:51 AM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Collectables
« Reply #1 on: April 15, 2012, 05:20:12 AM »
Make an int variable called NumCollected, and increase that by one every time you collect an item, using Int Add.

Then make a string variable called CollectedLabel, and use Convert Int To String to convert NumCollected to a string that can be used in Set GUIText.

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Re: Collectables
« Reply #2 on: April 15, 2012, 05:33:26 AM »
Thanks but How do i make int variables, cant seem to find how to create em.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Collectables
« Reply #3 on: April 15, 2012, 05:38:45 AM »
Add/select an FSM, then go to the Variables tab. Type in the name of the new variable, select the variable type, and click Add (or hit enter).

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Re: Collectables
« Reply #4 on: April 15, 2012, 06:17:05 AM »
I ACTUALLY GOT IT WORKING, yessss!!! thankyou!!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Collectables
« Reply #5 on: April 15, 2012, 06:18:47 AM »
Cool! :D