Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: PINKCANNON on November 01, 2017, 05:12:25 AM
-
Hello
I am new to Playmaker and scripting in general... so with that being said, here are my noobish questions.
I have a global int variable converted to a string to show onto the UI.
I want to activate actions/fsm everytime the int value reaches a milestone that I could set but don't know how to do that either.
Random but related Scenario:
My car rolls and at every 25km I would like for a big red light to flash and tell me that I am out of gasoline...
How could I achieve that with my variables?
-
Hi,
It depends a bit on your setup, but here are some ideas :
You can use some 'int compare' actions on the int variable. for each milestone.
or you can use a single 'int compare' but set a variable and add 25 after each milestone to compare to that global.
You can find many tutorials on the User Tutorial Wiki Page (https://hutonggames.fogbugz.com/default.asp?W548) to get you familiar with playmaker.
btw: a Tip : you should try to minimize using globals.
you can use "get/set fsm" actions to get/set local variables on fsms
-
Hi,
It depends a bit on your setup, but here are some ideas :
You can use some 'int compare' actions on the int variable. for each milestone.
or you can use a single 'int compare' but set a variable and add 25 after each milestone to compare to that global.
You can find many tutorials on the User Tutorial Wiki Page (https://hutonggames.fogbugz.com/default.asp?W548) to get you familiar with playmaker.
btw: a Tip : you should try to minimize using globals.
you can use "get/set fsm" actions to get/set local variables on fsms
Thank you! I will give it a look.
And it's a one scene game. I have 2 globals set up my int & string and thats it. I only need those. The milestone is to activate upgrade buttons each time player reaches a specified value. A type of clicker game but with an end since i don't want to get into math to much.
-
Did the int compare method and worked like a charm. Thank you again!
-
Hi,
No Problem :) happy to help