limit the amount of times an event runs

Get help using Construct 2

Post » Mon Apr 09, 2012 12:47 pm

hey more difficulties :(

I have managed to get the random events working on my game however i am unsure how to make a new event trigger only once and not repeatedly.

capx:
http://www.tilleydesign.co.uk/capx/EnergyFlux.capx

game:
http://www.tilleydesign.co.uk/capx/test/index.html

if you complete the first wave, then the next wave repeats the initial process about 5 or 6 times... i want this limited to one appearence so that it doesnt overload the game or player... any help greatly appreciated as always.

For those who dont have license copy of construct 2 here is a screenshot of my current event sheet:
Image 1
Image 2
B
25
S
7
G
5
Posts: 185
Reputation: 5,056

Post » Mon Apr 09, 2012 4:38 pm

Hi, I added the system > Trigger Once to the primary event in each group, it appears to have resolved the issue of multiple events running at the same time. But if anyone has a better solution would be happy to hear it. :)
B
25
S
7
G
5
Posts: 185
Reputation: 5,056

Post » Mon Apr 09, 2012 4:42 pm

I think that's what "Trigger Once" was created for, so I'm not sure there's a better or more elegant solution.

Other things you could do if you wanted to run, for example, only 5 times, is to have a global number variable that you increment in the event actions, and have a condition on the event myVariable < 5.
B
14
S
5
G
7
Posts: 235
Reputation: 5,175


Return to How do I....?

Who is online

Users browsing this forum: mercuryus, Naightwolf, Skebab, Swivels and 22 guests