How do I create a dual n-back game?

Get help using Construct 3!

Post » Sat Oct 21, 2017 6:55 pm

Hi!

I have tried creating a dual n-back game. For those of you familiar with the dual n-back game you know that when a certain object overlaps a square every nth time you are supposed to press a button in order to get points as a correct answer. I have tried to do this in various ways, with variables etc but it just doesn't seem to work. All thoughts are much appreciated! :)
B
3
Posts: 8
Reputation: 193

Post » Sat Oct 21, 2017 8:29 pm

Not familiar with a dual n-back game.

But it sounds like you should use an incrementing counter variable.

| Global number NthTime = 5

+ CertainObject: On collision with Square
-> Square: Add 1 to collisionCount

+ Button: On clicked
+ System: Square.collisionCount%NthTime = 0
+ System: Square.collisionCount ≠ 0
-> Function: Call "getPoints" ()

For reference, % gives you the remainder after division, which is what you need to use for every x overlaps. So if it is set to 5, that condition will be true when collisionCount = 0,5,10,15 ect. (then add an additional condition to make it not true when 0)

You might need to add a system to disable the event after points have been awarded for each tier.
Mistakes were made.
B
61
S
30
G
134
Posts: 1,964
Reputation: 75,430

Post » Sat Oct 21, 2017 9:15 pm

Message: 1pl1 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I may have misinterpreted you but it sounds like you are suggesting pretty much what I have tried already.

Perhaps if you could be so kind and check out this link with a functioning version of the game you will see my problem. http://brainscale.net/dual-n-back/training
B
3
Posts: 8
Reputation: 193

Post » Sat Oct 21, 2017 10:06 pm

use arrays to save all shown tiles (and sounds if your game supports that too) and a global variable(ie :Counter) to save count of tiles shown till now so when it wants to check 2 3 or x steps before, check Array[Counter-x] = Array[Counter] when user touches the shown tile, if true user gets the point.
B
20
S
5
Posts: 48
Reputation: 1,362

Post » Sun Oct 22, 2017 7:15 am

Hmmm, I have never used arrays, but I will try and see if it does the trick! Thanks!
B
3
Posts: 8
Reputation: 193

Post » Sun Oct 22, 2017 8:17 am

To be fair what you are saying pooya72 does seem to make a lot of sense but since I have never used arrays before I don't know how to make it happen. If you would be so kind and explain more in detail how to do it that would be most appreciated! :)
B
3
Posts: 8
Reputation: 193

Post » Mon Oct 23, 2017 8:10 am

I have tried with the arrays but I really can't figure out how to make it happen so if anyone can give me advice on this I would appreciate it a lot!
B
3
Posts: 8
Reputation: 193

Post » Wed Dec 13, 2017 6:36 pm

I didn't checked this thread after posting the last respond, do you still have that problem ?
if i didn't respond again email me at [email protected] followed by .com
B
20
S
5
Posts: 48
Reputation: 1,362


Return to How do I...?

Who is online

Users browsing this forum: No registered users and 3 guests