Switch to Construct?

New releases and general discussions.

Post » Thu Mar 18, 2010 8:44 pm

Global variables [u:27ua0613]are not broken[/u:27ua0613]. My fault if I explained it badly on that topic.
In python you can "set", "subtract from" and "add to" global variables just like in the event sheet:
[code:27ua0613]System.SetGlobalVar("lives",1)
System.SubGlobalVar("lives",1)
System.AddGlobalVar("lives",1)[/code:27ua0613]
To use the value of a global variable in python use "globalvar("lives")" which is equivalent to "global('lives')" in construct's expression editor.

So you can use global variables in python as easily as using events. What's broken about that?
B
79
S
24
G
53
Posts: 4,732
Reputation: 40,227

Post » Thu Mar 18, 2010 10:38 pm

I was just going by you post R0J0hound:
"Python access to global or private variables is currently broken, but here's a few related fixes that hopefully can be put into the next release:"

Nice to know it works. Mean time I should have my python skill up and running really soon!

cheers!
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Previous

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest