save data local - plugin

Get help using Construct 2

Post » Tue Jul 10, 2012 11:54 am

Hi all,

If this is the wrong forum to post > sorry. I really looked where to post this, but didn't see a good place for it.

Question is: Is there a plugin or another manner to store variables locally on the server, where the game is running.

I need it to make a program that anyone can access and use. If they change something, i want that change to be permanent, so if somebody else is starting the program (from another desktop), he/she will see that change.

Is something like this possible with C2?

Thanks in advance!
MAD
B
19
S
6
G
3
Posts: 33
Reputation: 2,712

Post » Tue Jul 10, 2012 11:58 am

you don't need a plugin for this, just use Ajax and a backend like perl, php or whatever, that is capable to write data on the server.
B
42
S
9
G
6
Posts: 437
Reputation: 5,626

Post » Tue Jul 10, 2012 5:22 pm

[QUOTE=Ubivis] you don't need a plugin for this, just use Ajax and a backend like perl, php or whatever, that is capable to write data on the server.[/QUOTE]

Hi, thanks for your reply. But could you be more specific? What should i do with ajax, perl, php or whatever?

MAD (Mark aka Dark)
B
19
S
6
G
3
Posts: 33
Reputation: 2,712

Post » Wed Jul 11, 2012 7:29 am

I would say this is better located at the "How to" section of the board, but I do hope this helps:

as JavaScript is not able to write to a server, you need to set up a script (easiest to learn is PHP in my opinion). With PHP you can set up a script that will either write to a file or a database. From your game, you need to set up the Ajax plugin to call you PHP script with the parameters you need.

It would be too much to explain how to set up the script. But how to use the Ajax Plugin is well explained in the manual.
http://www.scirra.com/manual/107/ajax
B
42
S
9
G
6
Posts: 437
Reputation: 5,626

Post » Wed Jul 11, 2012 8:24 pm

You can check in the how do I FAQ section "AJAX", there are examples listed showing how to make your C2 application communicate with server-side PHP.

Topic moved to the "how do I" forums.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Fri Dec 21, 2012 9:06 pm

Thanks!
B
19
S
6
G
3
Posts: 33
Reputation: 2,712


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Braus, supreme676 and 8 guests