COGames's Forum Posts

  • [quote:30229271]C2 is already a giant While loop, So you don't need while at all. get rid of it and add an Else to the event for the NOT case.

    What if this check is inside a triggered event? Then it isn't a part of the big C2 while loop.

    Example: When a triggered event happens such as a ship is destroyed by a laser, you want to spawn a new ship in a random spot, but you don't want it to overlap another existing ship. So you just do a while-loop to keep creating the ship until it's not in a spot that's overlapping.

  • Keeps getting hung up. <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    capx: https://1drv.ms/u/s!AobC4q3rBlr6itBTdWySnTV6BE4Pmg

  • Okay, so export the games with WKWebView mode selected when exporting with Cordova, and then, in Intel XDK, add the plugin for WKWEebView. Is this right?

    I did this and now my app running on my iPhone6 with iOS10, as well as my iPad2 with iOS9. The only thing is that I am unable to load the app via Intel's App Preview (I get "Error fetching data.js"), but it loads fine on the iPad. I guess this is Intel's problem?

    Just wondering now, the apps that I redid by changing the lines I mentioned in my previous post, how would they try to run in WKWebView mode? I didn't install the pluggin for that, so I should be good with those right? I should just use WKWebView in the future because it has better performance - right?

  • In c2runtime.js replace:

    this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB);

    With:

    this.isWKWebView = false;

  • It was a quick fix, here it is:

    In c2runtime.js replace:

    this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB);

    With:

    this.isWKWebView = false;

  • Well you guys are lucky - I'm having problems.

    I'm going to list my steps for anyone else going through this, maybe we can get somewhere:

    I basically made a C2 (R233) project that is as simple as can be (just one sprite that you press to display text), exported with Cordova (did not have any permissions selected, such as "media") then started a new Intel XDK project (made sure to have the latest XDK) selected the project.

    First problem: Upon importing HTML5 code, I get the error: "Error creating project: Import directory contains Intel XDK files". I do see an XDK file in the Cordova export directory, so I simply delete it. Then the project loads fine into XDK. In XDK, I select the tab to "test", I then select the button to push the files to the testing server and read the QR code from the App Preview app on my iPhone 6 and iPad.

    My iPad (not ios10) loads the app fine.

    My iPhone (has ios10 installed) gives the message: Index.html Error fetching data.js

    This happens when I export cordova with and without the WKWebView selected.

    Edit to add: Got instruction from the XDK forum to change a line in the c2runtime.js file, which worked (as far as getting the program to run on using XDK's "test" with the QR code and app preview app. I haven't tried it yet downloading from iTunes. Here is the line change:

    Replace the line: this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB);

    with the line: this.isWKWebView = false;

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • CDogs1964 - I created a new project and used the App Preview. It worked on my iPad (not iOS10), but not on my iPhone (ios10). So it seems the new project isn't the fix (at least for me).

  • chrisnewman - I'm having the same problem. I think people are just starting to download iOS10 and are just noticing that some apps aren't working. I just received an email from someone who bought my app, so I did a search and found that there are others with this problem. I just downloaded iOS10 on my iPhone6 and confirmed (sadly).

    Did you try this yet?

    (https://forums.adobe.com/thread/2167432)

    "Panic over, got it working.

    Just needed to add gap://ready and also file: to my Content-Security-Policy for the default source

    <meta http-equiv="Content-Security-Policy" content="default-src * gap://ready file:; style-src 'self' 'unsafe-inline' *; script-src 'self' 'unsafe-inline' 'unsafe-eval' *">

    Hope this doesn't hit anyone else who doesn't update their app before iOS 10 is released."

  • Just got an email from someone who purchased one of my apps - black screen on all devices using iOS10. This is going to be a nightmare

  • How do I have TTS in IOS app?

    I have it working using the C2 "UserMedia", however it only works on Chrome (not IE or Edge). When I use Intel XDK to test in on the iPad I see that the iPad does not support this. I searched for a pluggin, but I don't see anything that will seem to work.

    Any idea?

  • Here's a way you can structure it. Basically make the while and infinite loop and use the "stop loop" action to stop it.

    +--------------+
    | while        |
    +--------------+
    |  +-----------+
    |  | trueA = 0 | set trueA to 1
    +--|   -or-    | set trueB to 1
       | trueB = 0 | stop loop
       +-----------+[/code:jsiw2xm4]
    

    I tried it, but it is still stuck in the loop. Actually, I don't think it's in the loop since I put debug text there and I never see it. I'm thinking that it's just crashing. Please take a look. This is very strange:

    capx file with your suggestion: https://1drv.ms/u/s!AobC4q3rBlr6ibx9kpuqCadUF285lA

  • I totally had the same problem with IOS on the iPad and iPhone. Upon searching it seemed this was an android issue, not an IOS issue, but something changed and now it is both.

    The good news is there is a fix, I tried it and it worked. Here's a link:

    correncec was nice enough to put step by step instructions, which really saved the day for me

  • I think the 'OR' block doesn't work right with while loops.

    Here's the capx file:

    https://1drv.ms/u/s!AobC4q3rBlr6ibx8L_qw4oTDgur-jw

    A counter is constantly counting up, to show that the program is running. When you hit the blue button, it checks the condition of two flags, for the while loop. On start up the conditions are set so they are not true, and we should not go into the while loop. However, you can see that the counter stops running, so we are in the while loop.

  • You need to use an OR block in your event condition.

    You can right click on the far left margin on the event block and a context menu pops up, and there's an option for adding an OR to the event.

    The other way you can do it, which IMO seems more reliable anyway, is simply to double up your events and have one for each condition;

    While A is true -> do this

    -and another event below-

    While B is true -> do this

    Read more about OR blocks and other advanced features in THIS TUTORIAL

    ~Sol

    When I tried an OR block, I get: While or A is true or B is true.

    And that resulted in an infinite loop, regardless if A or B was true or not.

  • Why would you use a While in this situation ?

    A is true-->do some action

    OR

    B is true

    as long as either A or B is true the action fires so it is basically the same as , While A is true OR B is true

    I want to do the event if one or the other is true. If I check one then do the action, then I change my conditions.

    For example, I want to store a value that is not a repeat in a 3,0 array. I pick a value for 0,0, then I pick a value for 1,0 - but I need check it to make sure it's not equal to the value in 0,0 (easy to do). But then I pick a value for spot 2,0. Now that value can't be equal to the spot in 0,0 or the spot in 1,0.

    If I check 0,0, and its true (the same) then I pick a value that's not the same. BUT it might be the same as spot 1,0. If I find that it is the same as spot 1,0, I can change it so that it isn't, but now it might be equal to the value in 0,0. That's why I want to check it at once.