How do I use "is between values" correctly?

Get help using Construct 2

Post » Thu Aug 03, 2017 9:28 am

Hi, all!

I have a problem which I haven't been able to solve myself for a long time:
In the game, the enemies come in waves, and I want to achieve, that in every third wave comes a boss. I haven't make a boss yet, but I made a global variable named WaveCounter which counts the current wave in numbers, and when the value is equal to 3 there shouldn't come another wave of enemies because only the boss will come (when I'll make it).
I've tried two ways to resolve, that the things work the way they should, but in both versions, the enemies come even when WaveCounter is equal to 3.
I made a simple example for both versions, to show you what the problem is (these are my first Google Drive sharings, I hope everything is ok):
https://drive.google.com/open?id=0B8bpOn0wNMiIYkVxNVo4NkptdWM
https://drive.google.com/open?id=0B8bpOn0wNMiIZllyZDN2OC1GV1U

Anyone knows what's the problem?
B
4
Posts: 9
Reputation: 218

Post » Thu Aug 03, 2017 9:59 am

I don't see a problem here? You set WaveCounter to 1 when WaveCounter is > 3, so it reverts back to the start of the game. If you want it to go somewhere else then don't set WaveCounter to 1.
B
46
S
16
G
73
Posts: 2,084
Reputation: 43,677

Post » Thu Aug 03, 2017 10:42 am

plinkie wrote:I don't see a problem here? You set WaveCounter to 1 when WaveCounter is > 3, so it reverts back to the start of the game. If you want it to go somewhere else then don't set WaveCounter to 1.

This is not the problem, the problem is when WaveCounter is 3 there shouldn't happen anything, enemies come when they shouldn't.
B
4
Posts: 9
Reputation: 218

Post » Thu Aug 03, 2017 10:58 am

Take out the 0.1 second wait.
B
46
S
16
G
73
Posts: 2,084
Reputation: 43,677

Post » Thu Aug 03, 2017 11:20 am

plinkie wrote:Take out the 0.1 second wait.

So far it seems working. Thanks!
B
4
Posts: 9
Reputation: 218


Return to How do I....?

Who is online

Users browsing this forum: plinkie and 20 guests