playMaker

Author Topic: How to Specify a Variable from another state  (Read 905 times)

bb1234

  • Playmaker Newbie
  • *
  • Posts: 1
How to Specify a Variable from another state
« 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:)


Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: How to Specify a Variable from another state
« Reply #1 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.