About groups

Discussion and feedback on Construct 2

Post » Wed Nov 23, 2011 3:16 pm

Hi, where can I find a good explanation about groups? I tryed alone to activate a group to execute an action but nothing is happening...
Thanks in advance!
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
21
S
5
G
6
Posts: 167
Reputation: 4,887

Post » Wed Nov 23, 2011 3:23 pm

They simply organize events and allow activation/deactivation of said events.

Think of sub-events. If an event's conditions are true, then the sub-events are executed. Same thing happens here except true & false are activated & deactivated.

If you want to execute an event when the group is active, try "Is group active" under system conditions.Tokinsom2011-11-23 15:26:39
Image
B
230
S
27
G
13
Posts: 1,776
Reputation: 18,153

Post » Wed Nov 23, 2011 3:29 pm

Exactly. Im using like you are saying. See:
1) I start a group deactivated
2) I have a "Is Group active" condition
3) I execute some action when group became active
4) I deactive again.
To activate, Im puting a code on a "On Start Layout" event
but notting is happening.
Can I anex a program to be tested? So you can see what I am doing
Thanks for reply
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
21
S
5
G
6
Posts: 167
Reputation: 4,887

Post » Wed Nov 23, 2011 3:35 pm

Can you post a .capx? I did this and it worked..


+Start Of Layout
-Activate Group

----------------
Group (Deactivated at start)
----------------
+Group is activated
-Set text to "Group is activated"
Tokinsom2011-11-23 15:37:42
Image
B
230
S
27
G
13
Posts: 1,776
Reputation: 18,153

Post » Wed Nov 23, 2011 3:52 pm

Its worked! The problem was that I was creating an Event Sheet for each layout. Now I have created a global one and activated just right but I had to put an "and" was beginning to make sure that the correct layout. Thanks for the help!
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
21
S
5
G
6
Posts: 167
Reputation: 4,887

Post » Wed Nov 23, 2011 4:03 pm

Cool cool. Also, there's really no need to use "Is group active" inside of the group. Events in the group are executed as soon as the group is activated, so 'trigger once' or even a blank event will work.
Image
B
230
S
27
G
13
Posts: 1,776
Reputation: 18,153

Post » Wed Nov 23, 2011 4:08 pm

[QUOTE=Tokinsom] Cool cool. Also, there's really no need to use "Is group active" inside of the group. Events in the group are executed as soon as the group is activated, so 'trigger once' or even a blank event will work.[/QUOTE]
Hummm I did not know that! Now the events are running but the value that Im trying to save on local storage but not working. Can you see on my source ?
http://dl.dropbox.com/u/16702799/temp/NSCommander.capx
Thanks in advance!
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
21
S
5
G
6
Posts: 167
Reputation: 4,887


Return to Construct 2 General

Who is online

Users browsing this forum: BackendFreak, SashikLV and 14 guests