b781rev's Recent Forum Activity

  • I am wondering if this was useful or not? If it wasn't please let me know so I can post something better. This was something I did really fast. I was/am hoping it will help anyone with the AJAX feature who is having troubles with it. Give me your opinions. And constructive criticism is very much welcome. Thanx

  • Hi,

    I really like the layout of your website. I was wondering if I can use some of the design in my own personal website. Of course, there will be original designs in it, but I mostly like the top and bottom bars. I just don't want to design it without your permission.

  • Ok, here is the link:

    http://www.4shared.com/file/4djW66uI/construct_2_ajax_sample.html

    jax.php:

    <?php

    $level=77l

    echo $level

    ?>.

    I'm running my own server on my personal computer so I don't know exactly how this will work for you. If you have any questions I will try and help out as much as possible.

  • Ok, I have it figured out mostly. I will post it in a few minutes. It's really simple for the most part. I used the example on here to do it, but it's just to show you how it is done.

  • I'm still working with it as much as I can. I'm working a full time job and also designing a website. I can send data to a php page and save it to a database but still working on retrieving the information and using it in the game.

  • Can we start a forum just for AJAX? I think it would be very useful.

  • I'm going to be doing some work on the whole AJAX thing within the next couple days. I think I have a pretty good grip on it, but it will take some time to get it figured out. I will post whatever I figure out. I have only been using this program for two days so I'm new.

  • Ok, I think I have it. I will try it out in a little bit. Thanks for your help and sorry for being a pain. I won't be this troublesome in the future.

  • So basically I have to make a call for everything I want to load for example:

    php page - level: 5

    and it would be like var AJAX.level

    ... it will retrieve 5 and I can load the level from that if I put it into a global variable?

    Sorry, just trying to get my head around it. I know how AJAX and php work but for some reason I just can't get this through my head. This is the only thing I'm having a problem with in this program.

  • I know, but how do you retrieve it from constructor 2 itself and use the variables in the game?

  • Then how would I go about doing a saved data feature without using the sessions or local storage?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes I did, but it doesn't explain exactly how to retrieve variables from a php page and use them in your game. It explains how to call a page and load that page. I can save game information into my database with that method, but I want to pull data from my database by the users being logged in, and if data for that game has been saved it can be loaded into the game for that user from the data pulled from the database in which I put into variables. Does that make any sense at all. Just got off work and a bit tired. Maybe I'm missing something, I don't know.

    For example I have:

    $var1="value";

    in my php page.

    I want to get the value of $var1 into my game using the AJAX method.

    I'm guessing I might just be missing something and just can't see clearly right now so any help would be greatly appreciated. Thanks.

b781rev's avatar

b781rev

Member since 4 Oct, 2011

None one is following b781rev yet!

Connect with b781rev

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies