Possible to do this ?

Discussion and feedback on Construct 2

Post » Sun Oct 20, 2013 2:57 pm

Hello,

It is possible to set values in textboxes in a global manner ? like set text in layoutA then change layout to B and still see the same values in the textboxes ?

I tried setting the textbox global but the value are not fellowing. So i was wondering what ive been doing wrong.

In other words.. Theses textboxes are in layoutB but i want to set their values in layoutA.

Thanks!Rushino2013-10-20 15:01:18
B
16
S
5
G
1
Posts: 190
Reputation: 2,489

Post » Sun Oct 20, 2013 3:02 pm

global variable: score

set text to "score" in event sheet 1
set text to "score" in event sheet 2

or just have event sheet HUD with all on-screen-texts
and then include it in event sheets?
szymek2013-10-20 15:06:10
B
18
S
7
G
1
Posts: 783
Reputation: 4,247

Post » Sun Oct 20, 2013 4:08 pm

So even if the textbox is global.. it will reset its values in the next layout ? alright.. anyway i think i will go the global values route since i want to keep this data and in case i need it i will have it.

Thanks!Rushino2013-10-20 16:09:29
B
16
S
5
G
1
Posts: 190
Reputation: 2,489

Post » Sun Oct 20, 2013 4:22 pm

Hey,

try this .capx

In layout 1, a global text variable is prepared. When OK button is clicked, the text info in that moment is saved to the global text variable. This is then loaded in layout 2.Dan722013-10-20 16:23:20
B
35
S
14
G
3
Posts: 16
Reputation: 5,791

Post » Sun Oct 20, 2013 4:27 pm

Thanks guys! I will get a look at this.
B
16
S
5
G
1
Posts: 190
Reputation: 2,489


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 17 guests