playMaker

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

bb1234

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
How to Specify a Variable from another state
« on: December 24, 2018, 06: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: 475
    • View Profile
Re: How to Specify a Variable from another state
« Reply #1 on: December 24, 2018, 07: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.