gibbon's Forum Posts

  • Hi, I am trying to find out how i can generate a simple hash from a string?

    Any built in feature or plugins available in C3?

    Thanks

  • Thats because you need an actual & in your string...

    Change this: "score="&score&"user="&user

    to this : "score="&score&"&user="&user

    Andy

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I will do a working example for you tomorrow if that will help? What I suggested above was so you can see why the php wasn’t inserting into the DB. Without trying it looks like the php is being executed but there is obviously something not working in the php. But as the Ajax request is completed and the php was executed successfully you are still receiving the ‘all done’.

    Even if the php script throws an error, the Ajax request was complete so you will get the ‘all done’.

    Whilst the PlayFab Master Collection looks good it is not needed for what you are doing.

    What you are doing is very trivial, I have done a lot with construct, Ajax and php and never had any issues.

    Andy

  • You really need to be doing some checking via the PHP return.

    So, in PHP check if the SQL method was successful or not and echo out either "done" or the error message.

    Then in construct do the AJAX request like you already are but get the return output from the PHP which will be either "done" or the error.

    Then you can do what you need to do.

  • Hi, the method you are using in C3 is POST, but in your PHP you are trying to retrive data from a GET request.

    Andy

  • You would simply keep a count of destroyed objects in a global value from layer 1. Then when you go to layer 2, using the ‘on layout loaded’ event you create the number of objects based off the number in the global value.

    Andy

  • Hi, im not sure about working it out to be an exact time but increasing the multiplication against DT increases the speed.

    Subevent compare instance variable > zoom is = 1 > layer 0 , scale lerp(LayerScale("BG B"), 1.0, 10*dt)

  • Sorry, just re-read the cordova plugin and saving images currently is only supports iOS.

    Andy

  • gibbon Whats the name of your plugin? Maybe i will have to swich anyway because there is problem with other plugins on C3 rt also.

    It is available here:

    github.com/andygilbert/construct-save-share-image

    Do you know how to make the files into a addon? If not, i can do it and attach it here for you.

    Andy

  • Just to add to this, and to be clear on what I am doing.

    I have a plugin which I have developed.

    The c2 runtime action is as follows (and works perfectly):

     Acts.prototype.SaveImage = function (url)
    	{
    		 var exists = window["plugins"] && window["plugins"]["socialsharing"] && window["plugins"]["socialsharing"]["saveToPhotoAlbum"];
    		if (exists)
    			window["plugins"]["socialsharing"]["saveToPhotoAlbum"](url);
    	};

    I have converted the plugin to c3 runtime and put this action as follows:

    SaveImage(url)
     {
     var exists = window["plugins"] && window["plugins"]["socialsharing"] && window["plugins"]["socialsharing"]["saveToPhotoAlbum"];
     if (exists)
     window["plugins"]["socialsharing"]["saveToPhotoAlbum"](url);
     }

    Yet it does not work, so what changes for c3 runtime are required in order to get it work?

    If i change above C3 runtime action to this:

    SaveImage(url)
     {
     alert(url);
     }

    it works.

    Full code and plugin is here:

    github.com/andygilbert/construct-save-share-image

    Uncomment runtime line in plugin.js to try on c3 runtime.

  • Yea, I am wanting too but I just cannot get it to work, I am trying to get help from the construct team but not having much luck yet...

    If / when i get it working i will share it.

    Andy

  • I am trying convert my extended version of the social media plugin to use the C3 runtime, but having no luck.

    I have converted it so that it all loads up, runs without any errors.

    However, when i test it and call one of the actions, the iOS app just "flashes" and does not work.

    I have replaced the action to show an alert and this works fine so it is obviously something to do with accessing the cordova social share plugin.

    EDIT: Please see code in below post...

    Andy

  • Hi, I have developed a plugin that does just this. However, currently it only supports the C2 runtime as I cant get it to work using the new C3 runtime.

    Which runtime are you using?

  • I have seen that the User Media Plugin was fixed for iOS 12 yet for the life of me I cannot get it working.

    The Xcode log shows the following...

    WARN: Error requesting camera: TypeError: undefined is not an object (evaluating 'navigator["mediaDevices"]["getUserMedia"]')

    Is this still a bug or do I need to be doing something to get it to work?

  • Ive tried searching for solutions and whilst it has been asked many times it seems in the past I cant find a good working solution.

    I have a text box at the bottom, when you focus it resizes the app to really small due to the full screen option which has to be set.

    Any option or fix?