Soul3's Forum Posts

  • If it's not supported, you can easily make your own right-to-left typewriter effect:

    Thank you. More elegant than what I had in mind :)

  • Hello,

    Is there a way to change text direction (right to left) in the Text plugin?

    It would be nice if the Typewriting direction could be controlled as well.

    I am using TextInput for now, with CSS styling (which is pretty handy).

    Thanks.

    Tagged:

  • Ashley Thanks a lot!

    Can I show this camera stream back in construct (without C3's UserMedia)?

    I tried this code:

    if (navigator.mediaDevices.getUserMedia === undefined) {
    	navigator.mediaDevices.getUserMedia = function(constraints) {
    	 var getUserMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
    	 
    	 if (!getUserMedia) {
    		return Promise.reject(new Error('getUserMedia is not implemented in this browser'));
    	 }
    
    	 return new Promise(function(resolve, reject) {
    		getUserMedia.call(navigator, constraints, resolve, reject);
    	 });
    	}
     }
     
     navigator.mediaDevices
    	.getUserMedia({ video: true })
    	.then(function(stream) {
    	 var vid = document.createElement('video');
    	 vid.src = stream;
    	 console.log(vid);
    	})
    	.catch(function(err) {
    	 console.log(err.name + ": " + err.message);
    	}
    );
    

    It asks for permission, and the camera icon shows up, but of course, the video itself doesn't appear. I assumed it would work if I added a <video> to the page body. What's wrong with this approach, please?

  • Hello,

    Is there a way to access the camera through scripting? Either using Construct's UserMedia or by HTML5 (creating a <canvas> element and using WebRTC ..etc)

    Thank you.

    Tagged:

  • Thanks a lot ^_^

    adding wkwebview-engine plugin, then adding "usewkwebview=yes" to the options string did the trick!

  • Hello,

    I have a Cordova app, which is basically an InAppBrowser (a Cordova plugin) that shows a link to my C3 game on my server (HTTPS)

    The InAppBrowser displays normal pages fine, and runs Construct2 games just fine (as far as I tested), but C3 games do not display.

    First the loading screen shows up, but without the Construct logo (loading bar moves fine, but very slow), Then a black screen ..

    My guess is that it is that something prevents loading files and assets.

    Is there something we can do? some attributes or permissions?

    Here is code of our Cordova page:

    <!DOCTYPE html>
    <html>
    <head>
     <meta charset="UTF-8">
     <title>My Game</title>
     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
     <link rel="stylesheet" href="../css/bootstrap.min.css">
    </head>
    
    <body>
    <script>
     function CallAddress() {
    var ref = cordova.InAppBrowser.open('https://mylink.com/index.html', '_blank', 'location=yes');
     }
     window.onload = CallAddress;
    </script>
    
    <script type="text/javascript" src="../cordova.js"></script>
    <script type="text/javascript" src="../js/landscape.js"></script>
    </body>
    </html>

    Thanks.

  • Hello,

    We can't run our HTML5 game on iOS (but runs on Mac)

    Apple broke WebAssembly and are leaving it broken

    [url=

    https://www.construct.net/en/forum/new-topic?ffID=7]iOS 11.2.2 and 11.2.5b6 WebAssembly regression (error or hang)

    Is it fixed yet? Is there a workaround?

    Thanks a lot

    Tagged:

  • Soul3 can you please upload the .c3p,Cheers.

    :) https://ufile.io/wrcij9xs

  • Try this

    https://ufile.io/0meklhpe

    Thanks a lot :)

    When I added a background sprite, the circle showed up. Just moved the background to a separate layer below the layer of circle and square and now all is working :)

  • Sure!

    Add a new event, choose "System", then "On Start of layout".

    Click B while selecting this event, to add a sub-event.

    Add a new event, and choose "System", then "For".

    The rest is easy, so I will show you the final result instead:

    Try to play around with this to fully understand it :)

    Say Variable1 is "word1 f word2 f word3".

    First we need to know how many "word"s are in there. That's why we use tokencount().

    Then we need to get each one of those "word"s in order. That's why we use "For".

    "For" is like a counter, it starts from 1,2.. until it reaches our "word" count (in this case 3).

    The big Action on the right of "For" takes each word (using tokenat()), surround it with [color] tags and add it to Variable2.

    You will find more about tokenat() and tokencount() here. You can find more about "For" here (under the "Loop" section).

  • Thanks. It is a progress, but still needs some more work.

    I separated the front of the monitor from its "back", so the coin can go behind the border now and front the blue background of the monitor.

    Still working on how to hide the part of the coin which is outside of the monitor.

  • (For some reason I can't write "ि" correctly, so let's say it is "f")

    If I understand correctly, you have Variable1="word1 f word2 f word3" and you want to make "word1", "word2" and "word3" colorized?

    What you are doing now is that you are replacing each "f" with a colorized "f". You are colorizing the "f", not the words.

    You could take a look at the "tokenat" function, which you can use with a System:For loop event to split Variable1. Then you can replace each "word" with a colorized version. It will be something like:

    1- tempVariable = tokenat(Variable1,"f",loopindex)

    2- Variable1 = replace(Variable1,tempVariable,"[color=#ff0000]"&tempVariable"&"[/color]")

  • Hello,

    I have a Background and a Monitor sprite. The monitor has some coins moving in and out, but I need them to be cut from the background, i.e. The visible part of the coin is only the part that is within the Monitor border.

    In this image, the upper half of the coin should be Masked by the edge of the monitor.

    I played around with Blend Modes, but I think I need more layers (which I don't have access to right now). Will this be possible using layers, and if so, please how?

    Thank you.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    I am trying to make a color picker, and it would be easier to have access to the Color property of the object.

    Is that possible? Is there an easier way?

    Thank you.

    Tagged:

  • Thank you :) I will give it a try.