playMaker

Author Topic: Get Name of Material and/or Texture[SOLVED]  (Read 1476 times)

gregacuna

  • Full Member
  • ***
  • Posts: 143
Get Name of Material and/or Texture[SOLVED]
« on: November 22, 2016, 01:11:49 PM »
In my game right now players can choose between four different characters and the material is being saved in a global variable to be loaded on each level. It works fine when the game is started at the Choose Character level, but when I'm working on other levels characters don't have any material/texture.

I want to create a temporary FSM which checks to see if the Material is returning "None" and then load a temporary material. I was thinking the easiest thing would be to get the Material...compare the string to None and then load a default material if necessary...but I cannot figure out how to get the name of the material to compare it.

Is there a way to do that or another solution?

I might just create two separate FSM...one for production and one for building and turn them on or off, but would rather have a more elegant solution.

Thanks!
« Last Edit: December 13, 2016, 04:06:08 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Name of Material and/or Texture
« Reply #1 on: November 25, 2016, 02:29:18 AM »
« Last Edit: November 25, 2016, 02:44:13 AM by jeanfabre »

gregacuna

  • Full Member
  • ***
  • Posts: 143
Re: Get Name of Material and/or Texture
« Reply #2 on: December 06, 2016, 09:23:50 AM »
Thanks Jean...really appreciate that. Downloading and testing them tonight. :)