#what does global variables and local variables do?

1 messages · Page 1 of 1 (latest)

wide lynx
#

Im starting to learn about global variables (a bit..), and yet i still dont know what is it fully capable of (And the problem is same as my problem of learning local variables)

tawdry elm
#

Global Variables can be defined and used anywhere in the game, they're mostly used for stats, currency, progress, and other
Local Variables are defined and used in only one script, and are mostly used to shorten script or make it easier to read (they're also defined once, whereas if you had to use a value multiple times, like the closest enemy to the main actor, it'd be checked each time it's used)

tardy iris
#

Theres a yt explaininh this on julians channel

small crystal
#

Variables is like some indicators, like 1 (apple). The apple is called variables and you could use it for something else

#

Like
Food = apple
Food = 1

wide lynx
#

Thanks:D

small valve
#

but where is global variable

small crystal
#

There should be some buttons called data

#

You could create new global variable at there