Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: DanaMazzo on April 23, 2014, 07:08:12 AM
-
How to create GUI Button which will change material on object.
-
Here's how I would try it! :D
On your button:
GUI Button sends event "press"
On "press" adds 1 to a global int variable named "material index"
On your object:
State 1 can be "idle". Use the "int changed" action. When it changes, pass to State 2.
State 2 uses the "int compare" action, once for each new material state:
If global variable "material index" = 1, pass to state "green"
If global variable "material index" = 2, pass to state "red"
States "green", "red", etc use should use the "set material" action. When finished, they should pass back to the main state.
-
Huuu, im so sorry, I tried to make and understand what you have describe me but I couldnt.
If you can explain like in video tutorials?
I still didn't learned to think like programer.
Can you describe step by step what to do?