How to turn a function off

Get help using Construct 2

Post » Wed Jul 30, 2014 9:20 pm

Hi I have made a function for a fog effect to come on in the first 5 seconds for example but I would like to make the function disappear 10 seconds later for example any ideas?
You do not have the required permissions to view the files attached to this post.
Image
B
28
S
7
G
1
Posts: 105
Reputation: 2,676

Post » Wed Jul 30, 2014 10:00 pm

jaytrott86 wrote:Hi I have made a function for a fog effect to come on in the first 5 seconds for example but I would like to make the function disappear 10 seconds later for example any ideas?

You can't turn off a function, but you can turn off "Every X Seconds" condition after 10 seconds, Just make a global value or something like that, and make "Every 10 seconds">Set your global value to 1, and add to your "Every 5 seconds" another condition "Global value = 0", that's the easiest way.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Wed Jul 30, 2014 10:02 pm

Make a Group "functions". Drag the function under it as a 'sub event'. You can then enable and disable the group as you please with "System:Enable group".
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Jul 30, 2014 10:13 pm

codah wrote:Make a Group "functions". Drag the function under it as a 'sub event'. You can then enable and disable the group as you please with "System:Enable group".

Great idea, we also can place the "Every 5 seconds" event under that group too, to make it not trigger when the function is unavailable. If this event is not needed for something else.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Wed Jul 30, 2014 10:21 pm

Yes for sure. I would also give the group a better name.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Thu Jul 31, 2014 4:15 pm

Thanks @codah and @Sisyphus will try it out
Image
B
28
S
7
G
1
Posts: 105
Reputation: 2,676

Post » Thu Jul 31, 2014 6:49 pm

Hi guys @codah and @Sisyphus I've tried this but the fog will not appear, am i doing something wrong. (still new to this)
You do not have the required permissions to view the files attached to this post.
Image
B
28
S
7
G
1
Posts: 105
Reputation: 2,676

Post » Thu Jul 31, 2014 7:00 pm

jaytrott86 wrote:Hi guys @codah and @Sisyphus I've tried this but the fog will not appear, am i doing something wrong. (still new to this)

That's the example of how it should work, with group that has a better name :lol:
You do not have the required permissions to view the files attached to this post.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 31, 2014 7:18 pm

Thanks @Sisyphus for some reason that didn't work had to add the destroy event which worked (also changed the group name mainly for you my friend :)
Image
B
28
S
7
G
1
Posts: 105
Reputation: 2,676

Post » Thu Jul 31, 2014 7:19 pm

@Sisyphus
You do not have the required permissions to view the files attached to this post.
Image
B
28
S
7
G
1
Posts: 105
Reputation: 2,676

Next

Return to How do I....?

Who is online

Users browsing this forum: David181, jorgmaquoi, MPPlantOfficial, unicornspitfire and 28 guests