QuincyDK's Forum Posts

  • Hi all, I've got a quick question:

    is the following JSON string understandable by the Load from JSON string action?

    {"c2array":true,"size":[5,4,1],

    "data":

    [ [

    [1],

    ["GAMEID"],

    ["Spelletje"],

    ["true"]

    ],

    [

    [2],

    [""],

    [""],

    ["false"]

    ],

    [

    [3],

    [""],

    [""],

    ["false"]

    ],

    [

    [4],

    [""],

    [""],

    ["false"]

    ],

    [

    [5],

    [""],

    [""],

    ["false"]

    ]

    ]

    }

  • The .capx also has a reference to rex video as well as calljs. You might only use calljs, but the non-standard video plugin is still part of your project. so may be influencing it in some way (although I doubt it).

    I just tried it from Dropbox(https://dl.dropboxusercontent.com/u/34306693/exportedIHJ/index.html), and I don't really get any messages either. The list just doesn't display, but this could be because the buttons only display (becomes visible) on successfully retrieving data from your site, which I doubt I can properly test.

    I also tested the demo .capx that comes with CallJS (https://dl.dropboxusercontent.com/u/34306693/Cjstest/index.html)and it works fine, so the calljs plugin does work with firefox.

    Hopefully, someone with more experience with this plugin will help you, as it does appear to be a problem with the plugin and firefox.

    Well, in the end the problem was with the server response headers. Totally unrelated to Scirra or Construct2 x'D

  • Basically what happens is : I click START, I see the expected log calls and alerts, but the buttonsprites which I hid, won't come up.

  • Uses non-standard plugins, so can't test .capx.

    What errors are shown in the browser console?

    None, except something about minimal-ui... There is one external plugin I use, CallJS.

    The key "minimal-ui" is not recognized and ignored. <In Chrome, same for Firefox. THis is on Windows.

  • Hi all, I've got a project (capx file at the bottom, functions.js file available on request) that refuses to run on FF and Safari. I've tried all possible things I could think of, checking the network resources and such, but yet after I press "START" in the startscreen I get nothing... What is causing this?

  • Do people overlook this thread or does nobody know? :p

  • I now have the following events:

    CONDITION

    sprite.Width > width (set to width of loaded image)

    set height to round(imageDisplay.Height*(width/ImageDisplay.Width))

    set sprite.Width to width (set to width of loaded image)

    CONDITION

    sprite.Height > height (height of loaded image)

    set width to round(imageDisplay.Width*(height/imageDisplay.Height))

    set sprite.Height to height (of loaded image)

    However this does not resize (but when alerted gives correct sizes back).. What could be the issue of this?

    If needed I am able to supply an capx file (through pm)

  • I wasn't going to log on, but your did 4 horrible things here.

    1. Don't clone or duplicate objects as your doing.

    Instead create 1 Object, give them a custom variable name/id.

    Sprite1,2,3,4,5 is bad

    Text 1,2,3,4,5 is bad

    instead

    Sprite.id = 1, Sprite.id = 2, Sprite.id = 3, Sprite.id = 4, Sprite.id = 5

    same with text you have

    2. You don't list all valid numbers.

    You use curStory to check against for the IF statements, yet we don't know where curStorys starts.

    AND

    Button Loop starts at 1, but we have no idea what numberStory last number.

    3. If your not using the LoopIndex("Button") to get your number

    Do you really need a loop?

    4. If Number story which set's the loop count is related to your Array. Your Array Width is only 4. If your loop is based on Array Width then the loop only last's to a count of 4. If your loop count is for then CurStory will only ever be starting value of curStory + 4.

    5. Did I say 4? I meant 5.

    We are here to help, however the website is supposed to family friendly. And while I know the word "gay" can be jolly, such as "a gay old time" to mean a happy jolly time. The current slang and the context of use can be derogatory.

    Instead you should destroy what you have and make it over all better.

    Assign the variables to the objects instead of duplicating objects. This means you only need to include it in the list once.

    For Loop Button 4 to 8

    --//Event to build SOL would be

    --Text.id = loopindex("Button")

    --Sprite.id=loopindex("Button")

    --// actions would be

    Sprite.visible set true

    Text.visible set true

    Text..text = titlevalue

    Woops, I did not even realize that I went overboard with the JSON, I edited that out.

    Thanks alot, this has pushed me into the right direction I'll be more careful next time with supplied data and make sure to include more (detailed) info :p

  • Hi guys, I've got the following event sheet:

    However, only the first two text fields get set, but the buttons do show and when clicked do what they should do. The following JSON code is behind LIST:

    {"c2array":true,"size":[4,3,1],"data":[[["2kt2JbodBptBZCuPxKDKGQ"],["3434"],[1]],[["Mx+ENw3RXZfdfDCyM6P8kQ"],["Tariq is xx"],[1]],[["RC9SJZNPUYNon8nUi-6BRA"],["Of nee, Tariq is xx'],[1]],[["bdmbGBb5xxKeOJzjhFyuiA"],["Verhaal12345"],[1]]]}[/code:xu8btf12]
    
    Does anybody see what the problem is?
  • Okay, for the life of ..erm everything? x'D.. I cannot seem to figure this out... Anybody who wants to help a hand: feel free to..

  • This could be complicated but a workaround way could be maybe to use conditions to determine which is more out of the proportion you need, width or height. Also have it update a variable of the original size. Resize the image to fit which ever axis was too large by the most (either width or height) use the original value and the new value to work out the percentage to reduce/enlarge the other axis.

    I am only new to this and I am finding there is usually an easier way to everything but maybe this might help.

    I did not think of this, and is in fact complicated but helpful (I like a challenge ^^) Let's see how far this will get me

  • bump

  • Hey, right now I am using the load image from url event with keep current size. Is there any way to scale the images in such a way that they get parsed with their ratio intact? (So for ex say my image container is 100x50, I put in an 50x10 image, I'd like it to be fit as much as possible which would be 100x20 in this example)

  • Try Construct 3

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

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

    I cannot seem to figure this one out. I'm trying to run my function trough CallJS (setter(param) ) but this doesn't work. It seems that the moment I pass a construct variable through CallJS, the function refuses to do anything. Is there any way to accomplish this?

  • Hi, I'm Quincy and new to Construct. I have a small background with web development and control JS, PHP, HTML and CSS.