I have a scene behavior that draws and runs the logic for a global character 'selector.'
It has a couple attributes, Actor Source, and Actor Target.
Whenever a click happens on an actor, the selector checks to see if the source is blank. If it is then it sets the source attribute to the instance of the given actor. If a source is set, then a subsequent click on another actor will set it as the target of
a command.
What I'm struggling with is the check for if source is blank. If no source has previously been set, thats great, we just set the source. But if the source HAS been set, how do I type check that it is an actor? Has the type check been performed for me when detecting the event? The issue arises where the code may detect SOMETHING is set as source, so a following click on another actor sets the given actor as a target, even though it SHOULD have been the source.
And what, if any, default values are built in Stencyl for "null", or "void"?
Edit: Thanks LIberado, that worked. And thanks anyway tigerteeth. If the first method hadn't worked like a charm, I'm sure the second would have.