Grimmy's Forum Posts

  • I'm trying to simply move an object (an eye) to a position and then back again at random times however with the code below the eye movement speeds up and seemingly the Trigger_Eye_Movement function is getting run over and over again. I do not understand this as it should only get triggered once the tweeen (look centre from right) has finished..

    I thought I knew how the wait system worked but clearly something is going terribly wrong. It seems like this should be something very simple to do.

  • Hi, I have an issue with the plugin 1.73 (C3 version r218) Its giving a TypeError: Cannot read property 'updateLocals' of undefined error pointing at aekiro_gameobject.updateLocals(); I've sent you a message on discord but no reply.

    I have initialized proUI at the start of each event sheet but when I switch layouts (even to an empty layout) I get this error.

    Hope you can help! Thanks!!

    SOLVED!!!

    I actually just fixed this by removing 4 unused gameobject behaviours from objects in the main layer 0. The behaviours didn't reference anything and the objects were not children of anything..maybe that's why it crashed?? I guess it still shouldn't crash though! :)

  • I can use a construct event like this

    Set Text to zeropad(floor(t/3600),2)&":"&zeropad(floor(t/60%60),2)&":"&zeropad(floor(t%60),2)

    ..but how would I do this in a JS snippet? (as zeropad is a construct 3 command).

    I guess the question is really how do I access C3 expressions from script.

    Thanks

  • Great. Thank You!

  • Hi, is remote preview on mobile accurate for performance testing? I always thought it was basically just some kind of stream from the PC where the PC is doing all the work...or is the mobile doing the calculations itself?

    Can I effectively use it for measuring mobile load times and fps?

  • Use the anchor behaviour on parts of your UI to have them fix to different parts of the screen. Along with the new scene graph tool (new pinning) I'm finding extremely easy to create UI layouts for different aspect ratios. Supporting a complex UI in both portrait AND landscape though will always be quite painful so you should probably stick to one or the other if your UI is complex..

    Once your anchors are in you can then add further refinement based of the current aspect ratio. For example you might want to completely reposition buttons if the phone is very narrow.

    When testing it you can resize your preview window in realtime to see what it will look like at different resolutions. You should make sure your game looks good between aspects of 4:3 (1.5)ipad all the way up to 2.3 which is the really thin Sony Xperia display. Most common aspect is 16:9 (or 1.77) which you should probably use as your default design view if you are developing for mobile.

  • Can I bump this? If I can get this working it will be a game changer and allow me 3d in my C3 games. It works great for web builds but not on device.

    Here is the web test version working http://www.pigobo.com/TestC3/TestV3d_v2/index.html

    You can see its loading an iframe with content using the Verge 3d engine and can send message events to the iframe via JS events. In this case I just hide/show the cube.

    Blue square is a C3 sprite while the message button is a c3 html button. The only downside is that the iframe layer is always above all the C3 elements.

    Now if I could just get this working on Android I'll be able to essentially combine the engines to have the best of both worlds.

    Cheers

  • Has anyone tried mobile performance with ths?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Should I report this as a bug?

    Is using project based html files for iFrames supposed to work on Android in the same way it works on deployed Web builds?

    Hopefully someone can guide me, as this is actually the only sticking point for the progress of my current project. Without it, I'm stuffed :)

  • It seems like the export to the server uses the actual filenames (even they are local to the deployment) eg

    The debugger for the deployed web build (which works) reads:

    File to navigated to= c3interfacetest.html

    ..but the deployed android version debugger (which does not work) reads:

    File to navigated to= blob:file:///c7a3057a-b9a5-49ad-a399-b18bcf5539a9

    So maybe this is the issue?

    But how do I solve it as the blob version doesnt seem to be able to be used in the 'Navigate to' action of the iframe object.

    Something to do with the 'Allow' parameters in the iframe object maybe? or is it a bug? Surely the behaviour should be the same on a device?

    EDIT:

    -I tried adding blob://*/* to the whitelist on export. But that had no effect.:(

    -A also tried using Ajax to get the local file but this had no effect on ANdroid either.

  • I have a html file within my project files folder which I get at runtime and uses it as the url for an iframe.

    This works great when I export to the web and run in the browser. However, when I do the exact same thing in an Android debug APK the iframe never seems to get populated with the html. Why could this be?

    I get my html file like this:

    var mainHtml = await runtime.assets.getProjectFileUrl("c3interfacetest.html");
    var response = await fetch(mainHtml);
    runtime.callFunction("OnGotHtmlFile",[mainHtml]);
    

    then the OnGotHtmlFile function runs in the event sheet with the project file as the argument..

    -> myIframe: Navigate to mainHtml

    Like I said, this seems to run fine on the server in a web page but not on device. There are no errors given in the Chrome console.

    Tagged:

  • It seems that I can only import files and not folders. Is there any way I can drag a complete folder with its subdirectories and files into my project?

    Or some other trick to do this? My tree structure is too big to recreate it by hand everytime I need to update the files.

    Tagged:

  • Does this plugin even work? The only demo; Tiny Tank doesn't run (errors with : context.listener.setVelocity is not a function)

    And I dont see anything from the developer.

    If I could see a working demo of it running with Construct 3 I'd be more than happy to buy it.

    Or is it dead?

    Thanks

  • I want construct animations/sprites etc to sit on top of a video iframe.

    I read this was possible using css styles in another thread but the thread is kind of unclear (and quite old).

    I tried this but it doesnt seem to do anything:

    var myiframe = runtime.getInstanceByUid(3);
    myiframe.setCssStyle.zIndex=-20;
    

    So, Is there any way at all to have content sit in front of an iframe? This would be super useful!!

    If not, could there be some way of having 2 iframes? One iframe of my construct project on top (with a transparent background) with the other (video iframe) content below it? Would that even work?

    Tagged:

  • SOLUTION

    In order to send messages and bypass CORS issues during testing rather than use the c3_callfunction event I instead am using Window.onMesssage to send dat from the iFrame back to C3. This is how its done:

    In Child Iframe:

    //send simple message without data
    		parent.postMessage("MsgFromIframeToC3", "*");
    		
    		//send to c3 with some data
    		parent.postMessage(
    			{
    				event_id: 'MsgFromIframeToC3WithData',
    				data: {
    					v1: 'value1', 
    					v2: 'value2'
    					}
    			}, 
    			"*" 
    		); 
    

    IN C3:

    window.onmessage = function(event) {
    
    	//A single message
    	if (event.data == 'MsgFromIframeToC3') {
     console.log('Message from iFrame Received');
    		
     }
    	
    	//a message with data
     if(event.data.event_id === 'MsgFromIframeToC3WithData'){
     console.log( "c3D 3d Says: "+ JSON.stringify(event.data.data));
    		console.log(event.data.data);
    		
     }
    }
    

    ..and of course its completely possible to send message the other way (from C3 to iframe) using the same system in reverse (use window) for example (in C3):

    var myIframe = document.getElementById('myIframe');
    
    myIframe.contentWindow.postMessage('MessageToIframe', '*');