How do I Disable an Event through conditions.

Get help using Construct 2

Post » Thu Sep 04, 2014 1:16 am

Hey guys!

So I was wondering how to disable a block of events after another event happens. Such as say

Every Tick === Add 1 to Score;

If Game Over isOnScreen === replace with Add 0 to score?
Posts: 5
Reputation: 268

Post » Thu Sep 04, 2014 1:26 am

To answer the question, you can disable a block of events by creating a Group and putting the events in the group, then disabling the group.

But I think what you want is just to have the condition
X"Game Over isOnScreen" (i.e. inverted) ===== Add 1 to Score

If I understand properly. Note there is no point adding 0 to anything. Maybe you want to set the score to 0 when Game Over isOnScreen, in which case just have another event

Game Over isOnScreen
System:Trigger once ===== System:Set Score to 0
Posts: 1,646
Reputation: 6,596

Post » Thu Sep 04, 2014 6:55 am

If you look at it another way:

when conditions are met an event is enabled and thus its actions are performed

to disable the event all you have to do is make sure the conditions aren't met..

If you'd like to enable/disable a huge amount of events it would be easier to put them in a group and activate/de-activate this group through an event with certain conditions..

so when a certain condition is met - set group active
else - set group de-activated
(these kind of events only have to be triggered once while true (you don't have to turn the light on every second if it's already on))
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
Posts: 6,160
Reputation: 19,775

Return to How do I....?

Who is online

Users browsing this forum: hanrod and 11 guests