Pass Value betwen...

Get help using Construct 2

Post » Tue Oct 30, 2012 1:07 am

Hi, Im really amazed with this software, its just GREAT. Im currenly trying to develop a series of games in my country and i have a little problem.

I created a global variable ( life ) and when it passes to another Layout the variable goes to its initial value.

The main character passed with 2 of remaining live, but it passed so i call a GO TO + new level and opps the initial value of the global hit me on the face.

Im quite sure im doing something wrong, sorry about my bad english

Hope some one helps!
B
10
S
2
G
2
Posts: 68
Reputation: 2,273

Post » Tue Oct 30, 2012 1:18 am

Global variables shouldn't reset like this. Are you sure you're never resetting global variables?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Tue Oct 30, 2012 1:32 am

when i call the new layout with the GO TO, the variables restart, i guess be cause i have a INCLUDE SHEET command reffering to the place the variable its created.

I tryed to move globals to a new Start sheet, but when i try to move from the original place the code start yelling errors

Is there a way to pass a value to the global while changing to another sheet?
B
10
S
2
G
2
Posts: 68
Reputation: 2,273

Post » Tue Oct 30, 2012 1:54 am

SOLVED!
It was my fault, i was using a include sheet command, so in the included i had the Globals restarting, so i was forced to create a new global called, removelive so when player gets hit its increase one, and in the next sheet at the begin of the sheet it sustract from main global its gets from the include sheet!

Little trick did the job
:)
B
10
S
2
G
2
Posts: 68
Reputation: 2,273


Return to How do I....?

Who is online

Users browsing this forum: amarcelo, Draconinho, LeFuji, plinkie, totoe and 20 guests