FireBall

Post your Construct-made creations!

Post » Tue Feb 02, 2010 6:42 pm

Hi everyone!
I am complete new to Construct and I have to say that this is an awsome tool!! I am totally in love already. I am using this now for a couple of days and created a small level with some nice sidescrolling. just to get used to construct. This won't be a finished game but it is something like a playground for me :D

One question I have at the beginning. I am sure this is somehow possible. Is an object able to read and wirte global variables? If yes, how?

Note: I am totally not a programmer. But this Program is really awsome and easy to use!!! Love it!

So here is a small Video I made.
[url:2u2fzl4c]http://www.youtube.com/watch?v=mTALu0Mr1qA[/url:2u2fzl4c]

Greetings from germany.

Andreas
B
1
G
2
Posts: 3
Reputation: 631

Post » Tue Feb 02, 2010 6:44 pm

[quote="ndee":34o2n6yw]Hi everyone!
One question I have at the beginning. I am sure this is somehow possible. Is an object able to read and wirte global variables? If yes, how?
[/quote:34o2n6yw]
The System command takes care of the global variables... though you can make the appearance that an object has control of them (because global variables are, I believe, meant to have all-around access instead of being limited to one object).

You can also assign invidual variables to objects if you really want to.

But if you're talking about reading/writing to an external file... I haven't tried that.
B
7
S
2
G
3
Posts: 110
Reputation: 1,926

Post » Tue Feb 02, 2010 7:02 pm

Ok. Thanks for you answer.
One example. I have a global Variable. For example Time. How can I show this Variable with a textobject. I don't know how to say the system write this text into your textobject. Or tell textobject take the Value from the GLOBAL Variable.
B
1
G
2
Posts: 3
Reputation: 631

Post » Tue Feb 02, 2010 7:05 pm

You don't have to shift a global variable over to an object variable... I believe. Because objects already have access to them.

Try this small piece of code either way: global('name')

But replace the word name with the name of your global variable.

This returns the global variable value.

Of course, I could have misunderstood.
B
7
S
2
G
3
Posts: 110
Reputation: 1,926

Post » Tue Feb 02, 2010 7:08 pm

@ thetrue
perfect! That was exactly what I was looking for!!!!!! Thank you very much!!! :D
B
1
G
2
Posts: 3
Reputation: 631


Return to Your Creations

Who is online

Users browsing this forum: No registered users and 0 guests