korbaach's Forum Posts

  • Circle.capx

  • Can the browser's plugin "invoke download" action be used to download a file from dropbox to the users android device?

    tricky question...android use browsers just like pc...

    if you export game like HTML5 and use Chrome browser on android and append ?dl=1 to the end of your Dropbox Link

    so

    https://www.dropbox.com/s/harit7t63rmhksn/Untitled-1.png[/code:12rr2obu]
    becomes
    [code:12rr2obu]https://www.dropbox.com/s/harit7t63rmhksn/Untitled-1.png?dl=1[/code:12rr2obu]
    this works..for Chrome..but not for Opera Mini(on my phone..)
    
    I try to replace [code:12rr2obu]www.dropbox.com[/code:12rr2obu] with [code:12rr2obu]dl.dropboxusercontent.com[/code:12rr2obu]
    so..link looks like
    [code:12rr2obu]https://dl.dropboxusercontent.com/s/harit7t63rmhksn/Untitled-1.png?dl=1[/code:12rr2obu]
    this works on Chrome & Opera(but Opera shows pop-up window to confirm download..on my phone)
    
    I think it's best that you test it with several phones and several browsers...
    
    and if use wrappers.....good luck
  • Your Dictionary is empty.. (you can't set Dictionary from "raw" Json...)

    How do I work with JSON as ajax response?

    How do I MANIPULATE AJAX JSON

    How do I properly format JSON

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • same...but instead of Ball, you compare touch X & Y

    edit:

    I set force to distance*2

    so..if distance is 100 ;force=200..d=150;force=2*d...

    ..Of course you can set force whatever you want..this is just example..

  • If i could measure the travelled distance of the ball, or compare the object position before and after the touch i could solve this problem.

    I know that bullet behavior has this expression (travelled distance), but this behavior don't fit on my game purposes. Is there a way to measure the travelled distance of the ball?.

    System expressions

    add variable StartX

    ........-II-..........StartY

    On Touch start.. Set StartX to Ball.X

    .............................Set StartY to Ball.Y

    On Touch end...

    ..System compare two values: distance(StartX.StartY,Ball.X,Ball.Y)>some value...do something

    Else...do something else..

    ..but

    ...I think the better solution would be to compare distance between Touch Start X,Y and Touch End X,Y....

  • .... what the following parameters mean? "c2array"":true,""size"":[8,6,1]

    The 8 is the number of questions, but what is the 6 and 1?

    Array

    One-Dimensional Array (5,1,1)

    Two-Dimensional Array (2,2,1)

    Array=Array2

    ..if you use "Load from JSON string" ..you can set size & data in only one action...

    Array X=5 ; Y=6 ; Z=1

    (..in example I use Two-Dimensional Array(8,6,1) similar to this...)

    Arrays are zero based ..just like Sprite animation (first frame have index 0)

    I advise you to download this little program Array contents editor

    set X to number of questions as you want...Y=6 (Rows) ; Z=1

    and now you can fill the slots

  • Looking for this?

    cs2curious Game

    https://drive.google.com/folderview?id=0B2_5pssiMoD-ZGtJZDJTUDJRQ0E&usp=sharing

    this is what mine does

    fine...

    now type in browser

    https://googledrive.com/host/[/code:2x9fz69q]
    and copy your id
     [code:2x9fz69q]0B2_5pssiMoD-ZGtJZDJTUDJRQ0E[/code:2x9fz69q]
    
    and now  you have adress
    
    [code:2x9fz69q]https://googledrive.com/host/0B2_5pssiMoD-ZGtJZDJTUDJRQ0E[/code:2x9fz69q]
  • Well...I might have been misguided with

    I made separate score variables for each level. i.e. "Score" for layout 1/level 1, "Score 2" for layout 2/level 2, and so on. ...

    ..it would be best to Os better explain his problem, now that he knows that the global variable are global.. not "limited to the event sheet they are on"...it may be enough only one variable Score for all levels

  • I don't really understand arrays that much. All I know is, they allow information to be transfered between different layouts and event sheets, unlike global variables, which are limited to just the event sheet they are on.

    are you sure?

    Global variables store their values between layouts. Events in any layout can access any global variable...

    Event Variables

    Arrays are the best for data, but totally overkill for something as simple as a variable....

    Create an event sheet called variables. Now put all your variables into that sheet.

    well...let's say ..I have the 100 levels in the game and want to know the Score for each level...

    I think it's better to have one Array object than 100 Variables...(Level1_Score; Level2_Score;..Level77_Score..)

    ...but I could be wrong..

  • try...this way..

    just one Sprite..let's call it "Numbers"..10 frames..

    (animation speed=0)

    put sprites on Layout

    add Text object...in Properties..set Horizontal alignment-Right

  • OR

  • add some trigger above....