Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Tricky_Widget on August 29, 2015, 09:23:00 AM

Title: Custom actions: How to tell if a variable is a global? [Solved]
Post by: Tricky_Widget on August 29, 2015, 09:23:00 AM
I'm making a set of custom actions.  I need to be able to tell if a variable that my code gets is a global or not.  Is there any direct way to do this?  Or do I have to search through FsmVariables.GlobalVariables.typeVariables to see if there's a match?

Thanks!
Title: Re: Custom actions: How to tell if a variable is a global?
Post by: Alex Chouls on August 29, 2015, 10:51:42 AM
You can use:

FsmVariables.GlobalVariables.Contains(variable);

There probably should be an IsGlobal property on the variable... I'll look into adding that...
Title: Re: Custom actions: How to tell if a variable is a global?
Post by: Tricky_Widget on August 29, 2015, 10:53:03 AM
Ah, that makes more sense.

Thanks!


You can use:

FsmVariables.GlobalVariables.Contains(variable);

There probably should be an IsGlobal property on the variable... I'll look into adding that...