mehrshadfarahani's Forum Posts

  • I'm agree with . Many of my users use android less than version 5 . I'm wonder why everything is fine with C2 version R244 cordova export but not R259 . Ashley could you at least check it ? It's a serious problem for me . Thanks

  • Problem Description

    Multiplayer doesn't work after exporting to android.I've exported a simple capx and it says "multiplayer not supported" . This problem only caused after exporting and it doesn't have any problem in preview mode or browser . I tried both Webview & Webview+ export on my phone (galexy S6) . NOTE : this problem is not by cacoon because i export the same capx with R244 and it didn't have problem .

    Attach a Capx

    capx : https://www.dropbox.com/s/huv2b58cdbxotnr/mtest.capx?dl=0

    exported with R259 which has problem : dropbox.com/s/2tio5pddmhlye5a/mptest1.0.0.0.apk

    exported with R244 without problem : dropbox.com/s/8csa7px5uy9r488/mtestt1.0.0.0.apk

    Description of Capx

    A simple capx that checks multiplayer supported or not .

    Steps to Reproduce Bug

    1-Open the capx

    2-export it to cordova

    3-build an android version with cacoon or phonegape

    4-Try it on your phone

    Observed Result

    Multiplayer not supported

    Expected Result

    Multiplayer supported

    Affected Browsers

    Chrome: (NO)

    FireFox: (NO)

    Internet Explorer: (NO)

    Operating System and Service Pack

    Windows 7 64-bit ultimate service pack 1

    Construct 2 Version ID

    r259

  • Hi

    the question is clear . here is my code :

    curl http://127.0.0.1:7350/v2/account/authenticate/custom?create=true&username=mycustomusername \ --user 'defaultkey:' \ --data '{"id":"some-custom-id"}'

  • Thanks, it works perfectly! but i have one more problem about security .Anyone can access to my js code after export and read my server informations . What should i do ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi , I have some javascript codes to test turn server connection . Is there a way to use it in construct directly and get its final result(yes/no) ?

    Here is a code :

    	function checkTURNServer(turnConfig, timeout){ 
    
     return new Promise(function(resolve, reject){
    
     setTimeout(function(){
     if(promiseResolved) return;
     resolve(false);
     promiseResolved = true;
     }, timeout || 5000);
    
     var promiseResolved = false
     , myPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection //compatibility for firefox and chrome
     , pc = new myPeerConnection({iceServers:[turnConfig]})
     , noop = function(){};
     pc.createDataChannel(""); //create a bogus data channel
     pc.createOffer(function(sdp){
     if(sdp.sdp.indexOf('typ relay') > -1){ // sometimes sdp contains the ice candidates...
     promiseResolved = true;
     resolve(true);
     }
     pc.setLocalDescription(sdp, noop, noop);
     }, noop); // create offer and set local description
     pc.onicecandidate = function(ice){ //listen for candidate events
     if(promiseResolved || !ice || !ice.candidate || !ice.candidate.candidate || !(ice.candidate.candidate.indexOf('typ relay')>-1)) return;
     promiseResolved = true;
     resolve(true);
     };
     }); 
    }
    checkTURNServer({
     url: 'turn:127.0.0.1',
     username: 'test',
     credential: 'test'
    }).then(function(bool){
     console.log('is TURN server active? ', bool? 'yes':'no');
    }).catch(console.error.bind(console))
    
    
    
  • WOW ! it seems very useful for me . Is this plugin compatible with (cocoon canvas + ) export ?

  • Thanks for this useful plugin

  • Hi ,

    The function event will lose its parameters if you use wait action . You should make a local variable then save your parameters in it , and check the variable instead function.param .

  • Nope.

    Of course that doesn't mean using a family won't change how it performs.

    In other words sprite los to family is much different to sprite los to sprite.

    Thanks for your answer

  • Hi ,

    I have 45 objects that have line of sight behavior . I just want to know if i put theme into family , and set behavior just for the family , will i have better performance ? I've checked family example source and it doesn't have much difference , but i just want to be sure .

  • C2 doesn't have this option , but C3 has it .

  • Hi ,

    I really can not understand what you mean . Can you attach a short animation of what you want ? (gif)

  • Hi ,

    Try to add these two lines in your php file to ignore cashing :

    header('Cache-Control: no-cache');

    header('Pragma: no-cache');

  • Hi ,

    I have a tower that i use turret behavior for its attacking system . I have a soldier that it has 2 frames. I code something like this :

    On start of layout : Tower Add Turret Target "Soldier"

    It's working fine but i have a little problem . I just want to add soldier frame 1 as target .

    I also tried this way :

    But it sometimes has problem .

    Any solution ?

  • Thanks for the time you spent . You've told me very useful tips .