briggybros's Recent Forum Activity

  • It says in the documentation of the ajax object [quote:115ktyol]Note post data is in the same format as a query string, e.g. "foo=1&bar=2".

    which is the way I have formatted my post data.

    My php file:

    <?php
    	$postdata = $_POST['data'];
    	
    	echo("postdata: ");
    	if(isset($postdata)) {
    		echo ($postdata);
    	} else {
    		echo ("post data not set");
    	}
    ?>[/code:115ktyol]
  • delgado then I would say you're going to need to store the values for you to look at in the future, using a database or possibly and email system.

  • I've never been able to find this myself, I just either make my sprites the correct size when making them or work out the ratio with a handy calculator and set each value separately.

  • Because whenever A or D is down you set group running deactivated and walking activated. Personally, I would give the sprite a variable for whether the character was running or not. Then under the 'A is down' and 'D is down' events, include a sub event with a value comparison on the variable, and create an else to it then have the walking and running methods under there and just have shift toggle that variable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So you are looking to tell the player how long they have been playing yes?

    If this is just for the current game then you're just going to want to print System.wallclocktime which returns how long the game has been running in seconds.

    If you want to have it as total play time for no matter how many times they've run the game then it gets a little more complicated. You're going to need to store the latest play time on every close. Depending on the environment you want your game to be run in and how legitimate you want the value to be different methods will have to be used.

    If you just want an indication that doesn't really do much you can just use the WebStorage object. When the game is closed, use the WebStorage object to get a key which you're going to save the value to. If the key doesn't exist (i.e. this is their first time playing the game), create it with a value of System.wallclocktime, if it does (i.e. they've played before), get the value and add System.wallclocktime to it and save the new value. When you need to display this to the user, at any point in the game load the value from WebStorage and add the System.wallclocktimevalue to it (Do not save this back to the WebStorage else the system won't work).

    If you need a more secure way in which the user can't edit the value then you may consider setting up a database and using the AJAX object to connect to it to save and load the value in a similar manner. However, this requires you to have a hosted database and I'm not sure how compatible this method is with all export options.

  • I'm trying to send an AJAX post request to a php page to be handled using the following action.

    The request returns as completed and triggers the following event.

    To here it all seems to work fine, however, when creating the alert, AJAX.LastData doesn't return the output from the page. When using API Kitchen to test it manually, it works as intended, simply returning the value passed in with the key 'data'. This leads me to believe that the way I have formatted the data of the POST is incorrect. How am I supposed to pass a key and its value to a POST in C2?

  • Thanks, this now works. I had somehow got it into my head that doing that would, every tick, set the value back to 0 because of the overall 'Every Tick' repeating.

  • TiAm how then can I trigger the fade?

  • I have literally copied your method and it still doesn't work, here:

    the "Fade triggered" alert pops up, but then the opacity of the layer does not change.

  • You're welcome, I'm not a Scirra employee, just happy to help.

  • Would this suffice?

  • Hello, I'm trying to make a layer fade in over a period of 2 seconds. I have these events for it:

    This only runs through the every 0.02 seconds once and then finishes. I need it to run through it until the defined limit. How can I do this?

briggybros's avatar

briggybros

Member since 7 Mar, 2011

None one is following briggybros yet!

Connect with briggybros

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies