playMaker

Author Topic: pulling information from a script  (Read 1965 times)

laynardo

  • Junior Playmaker
  • **
  • Posts: 54
pulling information from a script
« on: March 01, 2016, 10:52:05 AM »
hi, I have seen various threads about triggering a function or the like within a script. But how do i pull info from inside a script. For example, I have this script called Location /Weather info- https://www.assetstore.unity3d.com/en/#!/content/50854. How do I get that info, like state or city into playmaker?
thx, layne

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: pulling information from a script
« Reply #1 on: March 01, 2016, 11:15:26 AM »
When trying to set or get data from a script you can use the "set property" and "get property" actions. Drag and drop the script into the action field-
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: pulling information from a script
« Reply #2 on: March 01, 2016, 12:37:36 PM »
and make sure the variables in the script are public.

laynardo

  • Junior Playmaker
  • **
  • Posts: 54
Re: pulling information from a script
« Reply #3 on: March 01, 2016, 02:46:50 PM »
ok, and the script doesn't have to be attached to a game object correct? I have one script attached as a component calling a few other scripts which initiate the public vars.

laynardo

  • Junior Playmaker
  • **
  • Posts: 54
Re: pulling information from a script
« Reply #4 on: March 01, 2016, 09:50:02 PM »
got it working! that was easy. solved.