Acessing subgroups and Score variable

Get help using Construct 2

Post » Wed Nov 30, 2011 8:29 pm

how can I call a subgroup ?
ex:

LEVEL01
>ENEMY
   > enemy01

i did:

system > on start of layout > set group enemy01 activated

but its not working.

my real problem is:
i have a global variable called Score on the first layout.
when i go to layout 2 , i want the Score to continue counting, not reset...

so i want to make a "GLOBAL" Event sheet, put all Levels and mechanics in there, with all groups and subgroups organized, so i can share the same Event sheet ( GLOBAL ) across multiple layouts.

B
16
S
2
G
6
Posts: 33
Reputation: 4,976

Post » Wed Nov 30, 2011 10:02 pm

[QUOTE=cademonteiro] how can I call a subgroup ?
ex:

LEVEL01
>ENEMY
   > enemy01

i did:

system > on start of layout > set group enemy01 activated

but its not working.[/quote]
It should be working.
Are the superior groups (Level01, enemy) activated too ?
If you activate a subgroup but that its main group isn't activated, logicaly the subgroup won't be executed.

[QUOTE=cademonteiro]
my real problem is:
i have a global variable called Score on the first layout.
when i go to layout 2 , i want the Score to continue counting, not reset...

so i want to make a "GLOBAL" Event sheet, put all Levels and mechanics in there, with all groups and subgroups organized, so i can share the same Event sheet ( GLOBAL ) across multiple layouts.

[/QUOTE] If you don't modify the value of the global variable score in your layout 2, it won't get reseted. That's the purpose of global variable, it is global through different layouts and event sheets.
Check the How do I FAQ, in the section "Variables (Local/Global/Instances)".
There's a few example of the intended use/behavior of variables.

For a "global sheet" you can do it too.
Put all your abstract mechanisms in a sheet (stuff that isn't layout related/will not only happen in layout 1 or 2 or ...) and include this sheet in each event sheets setted to your layouts that will require those mechanisms.
You can check my capx of Space Jinx (also listed in the FAQ) it is a complex project, but it is commented and uses inclusion of event sheets.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Wed Nov 30, 2011 10:50 pm

hi Kyatric, thanks very much !!!!!
B
16
S
2
G
6
Posts: 33
Reputation: 4,976


Return to How do I....?

Who is online

Users browsing this forum: anty21ro, DamonZero, Google [Bot], Radulepy and 0 guests