How do I stop a countdown

Get help using Construct 2

Post » Fri Oct 16, 2015 11:01 pm

Hey guys! I am currently working on a game were you have food and water, you lost 10 every second, these are Global Variables. I also have a random event system- every 10-30 seconds, a random event will occur. unfortunatley, you still lose food and water while the event happens (Like getting involved in a battle), so once you finish battling someone, you have 200 food but when the battle started you had 600. Any help? Thanks!
B
3
Posts: 7
Reputation: 195

Post » Sat Oct 17, 2015 1:21 am

So essentially, you want to stop the countdown during the "Event" and continue the countdown when the "Event" is over?
B
21
S
5
Posts: 44
Reputation: 1,644

Post » Sat Oct 17, 2015 9:23 am

two ways.

one - use a global variable to determine if the player is in battle and check it in the subtraction event..
(add a "player is not in battle" condition)

second - use groups for the events pertaining to the battle and those not and activate/deactivate the groups based on what your game is currently doing..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Oct 17, 2015 9:25 pm

so have a global variable saying: playerInEvent = 0
Encounter2
set playerInEvent = 1

then in my subtraction event, would I use it as a condition so like
Every 1.0 Second(s), playerInEvent = 0
subtract 10 food
subtract 10 water


Like that, right?
B
3
Posts: 7
Reputation: 195

Post » Sun Oct 18, 2015 1:12 am

and one more question, how would i stop my random events from occurring? I figure i will try the same thing that worked with the food.
B
3
Posts: 7
Reputation: 195


Return to How do I....?

Who is online

Users browsing this forum: jkmalau and 15 guests