Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: bb1234 on December 24, 2018, 08:40:27 AM

Title: How to Specify a Variable from another state
Post by: bb1234 on December 24, 2018, 08:40:27 AM
Hi,

How can I Specify/Set a Variable from another state?

I want to Set the Array Set Variable on state 13 From State c1

Please see the image for reference.

Hope to get some help:)

Title: Re: How to Specify a Variable from another state
Post by: Thore on December 24, 2018, 09:23:56 PM
Usually, setting a variable means basically copying it over from another identical variable type. You just make the new variable, put it in the upper field (red), and then you set the source variable in the lower field. In code, it’s basically this:

Code: [Select]
int x = 1;
int y;

y = x;

Read, y “is equal” x, since equal was 1, y is now 1, too.