playMaker

Author Topic: Printing variables or showing on screen  (Read 2664 times)

iloveaphextwin

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Printing variables or showing on screen
« on: April 24, 2013, 02:11:11 AM »
Hi there,

I want to be able to print my variables on the screen or at least in the editor window, or at the very least see them changing in the editor.

I can tick the debug box and see them changing for the first 3 seconds in the editor and then they seem to just stop changing.

I can create a GUI label, make my variable global, convert my variable to a string and set the GUI text to print that string. This is a really long process for every variable I want to look at.

Is there any way to just print(myVariable) like you would when coding normally. I may have to try and add this as a custom action in playmaker.

Does anyone have a better way to do this? I was also thinking of making a script that does all the GUI set-up for you but then my variables still have to be global which is a pain when you don't want them to be in your program as you have to set everything back.

Please help

Will

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Printing variables or showing on screen
« Reply #1 on: April 24, 2013, 08:30:32 AM »
do you want to see changes while in Gameview?

Then just choos the variable and tick "show in inspector" on. then you can see the the var of the selected FSM in the inspector (and the FSM tab of Playmaker) while playing.

This only works for local vars. I would love to be able to see the global vars somewhere but the only way i know of is the way you described which is annoying. so i try to avoid globals if possible.

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Printing variables or showing on screen
« Reply #2 on: April 24, 2013, 10:28:02 AM »
 :D

I actually just find the values of the global vars in gameplay. in the global var tab you just select the var you want to know the value of. then its displayed at the bottom where you could change the name and value. Its updated while gameplay. Great!

iloveaphextwin

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Re: Printing variables or showing on screen
« Reply #3 on: April 24, 2013, 11:12:22 AM »
Thanks a lot, some good tips.