Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: acriticalstrike on July 11, 2014, 01:01:35 AM

Title: Action to set a global texture variable? I can set fsm texture... no global Var.
Post by: acriticalstrike on July 11, 2014, 01:01:35 AM
Why cant i find an action to set a global variable of type texture? I see set fsm texture. and thats exactly what im using but... thats a pain why cant i just set a global texture variable

Right now I set the fsm texture of another object using set fsm texture and then use a third to "get fsm texture" from the second. If i could directly set the global texture variable I'd be happier because there'd be no need for a middle man object that just sits there having its textures set by other objects and then grabbed from others that's the job of a variable not a game object... Do I need write an action to set a global texture variable or am I missing a feature that playmaker already has?   ???
Title: Re: Action to set a global texture variable? I can set fsm texture... no global Var.
Post by: jeanfabre on October 20, 2014, 07:22:39 AM
Hi,

 I think you are getting confused with the concept of global variables vs local variables on a fsm and the meaning of "set fsm xxx".

you can't expect a global variable being listed in actions "Set fsm xxx" because indeed this is meant to set a variable that is local to the targeted fsm.

 and now I realized that indeed you are missing an action to set a global texture :)

 You can get it from the Ecosystem browser (https://hutonggames.fogbugz.com/default.asp?W1181) or download it here:

SetTextureValue (https://github.com/jeanfabre/PlayMakerCustomActions_U3/blob/5d2d55ae66dde9a8dfb6544628d7533526185b39/Assets/PlayMaker%20Custom%20Actions/Texture/SetTextureValue.cs)

 Bye,

 Jean