Trigger Groups once?

Get help using Construct 2

Post » Tue Nov 20, 2012 9:21 pm

Hi,

is there any way to use groups as a kind of functions, just like "trigger once", without the need of disabling them at the last event in it?

Thanks :)
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Tue Nov 20, 2012 9:47 pm

You can set a another condition as a variable.

EventUsed = false.


Object condition
EventUsed = false   ----> thise groups actions


end of group actions ----> set EventUsed = true


Make sense?
B
20
S
4
G
2
Posts: 124
Reputation: 2,482

Post » Tue Nov 20, 2012 10:12 pm

i've tried what i guess you mean, but this does add events, since i still need to set groups inactive.

could you show me an example?xeed2012-11-20 22:22:05
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Tue Nov 20, 2012 10:37 pm

Its just adding a secondary condition to the events in the group. they won't activate until both conditions are met. you can use the secondary event condition to control when actions can be set. so you have a group of events you want to be active only once? you just set an action where you want the group action to end to change the variable thus eliminating the statement of the secondary condition.

I don't see how this adds whole new events just conditions within an event and an addition action where the group of events end.
B
20
S
4
G
2
Posts: 124
Reputation: 2,482

Post » Tue Nov 20, 2012 11:25 pm

to set a variable at the end of a group is the same effort, as setting the group itself inactive.

if i dont understand your solution, could you upload an example please? xeed2012-11-20 23:26:19
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Wed Nov 21, 2012 3:05 pm

It's probably better to use the Function object for this!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Wed Nov 21, 2012 8:13 pm

thanks ashley. :)

i can't find i way to do this. is there any tutorial about functions?
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Wed Nov 21, 2012 8:27 pm

i just found it, getting ahead ^^

http://www.scirra.com/forum/topic59655.html

cya
B
15
S
3
G
5
Posts: 396
Reputation: 4,977


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 16 guests