dead on next or restart of the layout.

Get help using Construct 2

Post » Sat Jul 05, 2014 4:07 am

Has anyone had this problem? When going to the next layout, your player acts like its dead? How would you fix this?
B
10
S
4
G
1
Posts: 159
Reputation: 1,933

Post » Sat Jul 05, 2014 4:42 am

Are you using a single EventSheet? You need to set the eventsheet for the next layout to be the same as the first.
ImageImageImage
B
71
S
21
G
231
Posts: 3,691
Reputation: 129,358

Post » Sat Jul 05, 2014 8:32 am

try to check the global variables
~Everyone can make GAMEs~
B
55
S
11
G
1
Posts: 414
Reputation: 5,786

Post » Sat Jul 05, 2014 8:58 am

@Codeman320 : when you go to a new layout with the same event sheet, not only the global variables keep their state, but the event groups stay active/inactive, as you left them at the end of the previous layout.
You can reset all of your global variables and groups manually when the condition "On layout Ends" triggers. You can use the system action "Reset global variables" if your game doesn't need most global variables to be persistent.

Generally, for variables that should reset when restarting the layout, you don't want to use global variables. Use local variables whenever you can, or store variables into a file/dedicated sprite object.
B
77
S
22
G
4
Posts: 311
Reputation: 12,714


Return to How do I....?

Who is online

Users browsing this forum: David181, evillair, tarek2 and 57 guests