Who said you can't create a database with Construct 2?

Favourite 62 favourites
Tutorial written by ZaksCommunicatesOriginally published on 21st, March 2012 - 12 revisions

Yeah I am very happy to learn that Construct 2 can be used to create:
-an app
-a slideshow/presentation
-apart from the game creation itself.

After learning, an idea of making a Database Form App came up and to my surprise is working but Im trying to get a finish touches on it. The beauty of is no additional plugin was needed All what is needed is mainly
--global variables.
--Private variable
--form control (buttons, labels and textboxes)

Adding additional plug-in will make it a better, beautiful, effective and functional database.
From here we will go straight in showing how one goes and make a simple database but you can broaden your mind and create a login form for you game creation so making the user having an account for his/her own game. Or having checkpoints and level creation stored once the user accomplishes the level.
Here I expect you to have familiar with the Construct 2 and not a very newbie.

Let’s Begin:
Open your Construct2 and create a new single file project. I will call it Vocabulary Store.
Insert buttons, textboxes and labels like in the screenshots below

Insert Webstore Object.
Insert Array Object of a 3(number of textbox we have) by 1 by 1. Name it Database. Then go to the project property view and change the window size to 550 by 650.

Note you are free to name, add any object and arrange the way you want.

Now the “Coding”:

Open the events sheet and add the various events
Add some global variables as such:
A Word as text and set it to nothing
represent the data that will be stored from TextWord.Text

B Synonyms as text and set it to nothing
represent the data that will be stored from TextSynonyms.Text

C Meaning as text and set it to nothing
represent the data that will be stored from TextMeaning.Text

D Index as number and set it to 0
represent the number of times you will click the AddBtn OR
represent the Unique Key for your data storage

E tIndex as number and set it to 0
*Get the number from the TextIndex.Text then subtract the number and input it back to TextIndex.Text thus retrieving the data that corresponds the TextIndex.Text to the Unique Key number hence
functioning for the Back Operation Data when one press BackBtn*
For the Next Operation Data the number is added when one press NextBtn.

Note the first three variable depends on the number of textbox which correspond to the name of the Textbox you gave and which also determine the number of array (database). Width ie
If you have 5 Textbox you will an array.width of 5 and also 5 global
variables for it.

              I hope you are getting what I am saying.


Stipipoy 2,438 rep

This is great! C2 is full of surprises alright.

Thursday, March 22, 2012 at 2:22:12 AM
Bigheti 17.5k rep

Cool, but is it possible to change the images for the better image? I can't to see then! Congratulations for this tutorial and thank you so much!

Thursday, March 22, 2012 at 2:40:13 PM
ZaksCommunicates 3,426 rep

@ Stipipoy Yeah Thanks
@ Bigheti Its possible, I'll change as soon as possible but hope its been helpful without the clarity of pics. Thanks.

Thursday, March 22, 2012 at 3:32:41 PM
Wishy 6,659 rep

nice tutorial man, gonna try this out soon

Thursday, March 29, 2012 at 12:17:58 PM
urbano 5,099 rep

WOW ^ _ ^ X. Great tutorial. I've already tested ...

Thursday, March 29, 2012 at 11:13:08 PM
ZaksCommunicates 3,426 rep

Thanks guys. Im glad to have helped some citizens.

Friday, March 30, 2012 at 5:00:17 AM
cs2curious 3,463 rep

um update your capx please, thats the home page

Friday, March 30, 2012 at 7:15:11 PM
ZaksCommunicates 3,426 rep

@ cs2curious. Phew I have updated. Thanks for informing me.

Friday, March 30, 2012 at 9:20:18 PM
AvonPok 2,280 rep

Nice tut.
But unfortunately not easy to understand for a beginner (especially without pics where it's possible to read the event sheet lines).
For example the code with the "&Index" etc.

I hope you can add pics where the text is readable.


Friday, June 15, 2012 at 9:07:55 PM
osamaraddad 1,986 rep

Please, Upload higher picture quality

Thursday, May 09, 2013 at 1:34:41 PM
codefiend 1,284 rep

Please please please please upload better pictures. This tutorial is exactly what I need but I can't see the pictures enough to make out what your code is... Will you please please please upload different pictures?


Friday, November 01, 2013 at 6:57:17 PM
Cpryd001 4,520 rep

This is great! I definitely would benefit from higher resolution photos. I tried to open it but I need a few plugins to get it to work. When I do open it up, I'd love to take those screenshots and send it your way.

Monday, December 02, 2013 at 3:38:07 AM
mikegranger 989 rep

I downloaded the capx and it asked me to install the "UITemplates" plugin.
Where I can find that plugin :-(

Saturday, September 17, 2016 at 2:35:33 AM
KoolEcky 16.3k rep
Saturday, October 15, 2016 at 2:18:54 AM
stormjacob 177 rep

BRO, please send me a clear picture of the codes please.. i cant barely understand the words

Saturday, August 12, 2017 at 4:56:46 AM

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.