How do I fix this bug?

Get help using Construct 2

Post » Thu Apr 09, 2015 3:25 am

So I am trying to fix a bug. Here is how it happens.

To replicate bug:
Click on the TV and TURN IT ON
Then when the visibility=1 and enemyGirl=anyValue
Click on the cam number displayed in enemyGirl

Tha game is supposed to wait 15 secs and then randomly choose a new value for enemyGirl. What happens is that enemyGirl value starts changing rapidly for some time instead of just picking a one of the choose(values)

https://www.dropbox.com/s/tga5mr4k10mzw ... .capx?dl=0

Thank you all for your help.
B
5
S
1
Posts: 38
Reputation: 482

Post » Thu Apr 09, 2015 5:35 am

I'm guessing your Girl Spotted group code is continually running - remember, Wait does not block. The engine keeps running every tick, so the same action is done repeatedly. You need to disable the code while the 15 second Wait period is processing.
ImageImageImage
B
71
S
20
G
189
Posts: 3,533
Reputation: 107,840

Post » Thu Apr 09, 2015 10:50 pm

I tried that but didn't work... been 2 weeks and I haven't been able to figure it out. @blackhornet
B
5
S
1
Posts: 38
Reputation: 482

Post » Thu Apr 09, 2015 11:21 pm

I'd recommend you make a smaller project that displays the same problem. Currently there is just too much code to actually understand what is supposed to happen. 9 times out of 10, you find the solution yourself doing this.
ImageImageImage
B
71
S
20
G
189
Posts: 3,533
Reputation: 107,840

Post » Thu Apr 09, 2015 11:41 pm

Just throwing this out there. It looks like you intend for your code to only run once when the conditions are met, so why not use "Trigger Once" in your conditions?
Image
B
10
S
3
G
2
Posts: 196
Reputation: 2,053

Post » Fri Apr 10, 2015 2:03 am

I tried both solutions but didn't work.

Instead of doing every 30 seconds on the Girl Movement Level 1 group. I tried putting the system to wait 30 secs after each condition was met. It didn't work. Now the enemyGirl variable goes haywire after 30 seconds.

Thank you guys for your help I will keep trying and testing.
B
5
S
1
Posts: 38
Reputation: 482


Return to How do I....?

Who is online

Users browsing this forum: Isomoar, SoldjahBoy, Yahoo [Bot] and 7 guests