playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Import variables from custom scripts
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Import variables from custom scripts (Read 1448 times)
schinken
Playmaker Newbie
Posts: 1
Import variables from custom scripts
«
on:
May 01, 2017, 01:28:42 PM »
Heho.
I just downloaded Playmaker with minor coding knowledge (did a lot of game stuff already, but more on the art side
), and I have one problem.
Whenever I search for the solution I just get very very confusing answers.
So, I guess the solution is already out there, but some of you guys need to break it down to someone like me
. Sorry
I don't really see a way to use variables from my scripts in playmaker.
SO. I have a variable a and want to initiate a transition when it is at a certian value or true or whatever.
I already tried to play around with the GetProperty thing, but it doesn't really work.
Or I have a variable a and want to change it to a different value.
How do I do that?
Logged
velketor
Junior Playmaker
Posts: 69
Multimedia Marathon Man
Re: Import variables from custom scripts
«
Reply #1 on:
May 01, 2017, 02:18:50 PM »
The way I play with variables from scripts is to drag the script from my GameObject into PlayMaker and 3 options appear: Get Property, Set Property and Method. Use the Method option and select the variable you are trying to manipulate.
Logged
tcmeric
Beta Group
Hero Member
Posts: 768
Re: Import variables from custom scripts
«
Reply #2 on:
May 01, 2017, 10:55:52 PM »
You need to write a custom action. You can learn how to do so here:
//www.youtube.com/watch?v=U0zm2EVqDBU
Its not too hard if you are already familiar with C# especially and only looking to pass variables back and forth.
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Import variables from custom scripts
«
Reply #3 on:
May 03, 2017, 01:30:58 AM »
Hi,
A Custom Action is the way to go, but GetProperty and SetProperty should work, for all public variables in regular components, if your script is not a component then yes, a custom action is mandatory.
Bye,
Jean
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Import variables from custom scripts