Grimmy's Forum Posts

  • Dead link apparently. :(

  • Primary I guess I need to somehow be able to first locate the C3 element and then somehow call a function.

    In my case the application that calls the function is actually an iframe contained within a C3 window so I thought I might use something like this...

    window.parent.c2_callFunction("FunctionFromIframe");

    But that just doesn't do anything at all.

  • I added a html page as one of the files to my project and I want to view it from the running project as an iframe.

    in the URL field of the iframe object I tried putting "/myHtmlFile.html" but nothing happens.

    if I try file://myHtmlFile.html I get an error: "Not allowed to load local resource:"

    also local/myHtmlFile.html fails with a 404 error..

    Is there a way to do this?

    ALso, I just tried uploading everything to the same folder on a server but I still get permission errors:

    Uncaught DOMException: Blocked a frame with origin "https://www.pigobo.com" from accessing a cross-origin frame.

    I cant understand because both the c3 index.html and the myHtmlFile.html are sitting in the same folder..?!?? How can this be a CORS issue?

    Cheers

  • Lets say for my game I want my user to be able to choose from 1000 fonts (about 250 meg when added to the project) but obviously this is way to big for a web game.

    So, is there some way I can download the selected .ttf from a url into the project at runtime and then use it once ready?

    This way the game can launch as normal and download individual fonts as and when they are needed.

    Cheers

    Tagged:

  • Say my game is 640*480 but I want to save a huge high res screen shot of it. (1920*1080 for example). Is there any way I can do this and save it out to a file (jpeg or png for example)?

    Cheer

  • Understood, but do you have any kind of very rough idea? :) I don't want to invest too much time if its not really feasible still. I know you probably think I'm just being lazy but do you think for example it could easily do 10 bipeds on a 2 year old mobile or more like 1000...or just one. I only say this because you mentioned the problem of frame rate earlier and I'm just keen to know really if its either a huge problem or just a problem if I wanted a screen full of sprites.

    BTW..have you seen Creature Animation Pro (https://creature.kestrelmoon.com/) it looks like an amazing Spine/Spriter alternative but again I don't think there is a C3 plugin :(

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What kind of performance are we looking at with this now? How many animals could you put in there before it slows down to below say 20fps on 'regular' pc or on mobile devices.

    I'm in a constant mental battle whether to go with something like spine or regular sprite sheets but I'm supposing regular sprite sheets eat up a lot of space.

  • I have a bunch of numbers in my JSON data array like so...

    "achievements_unlocked": [ 9, 5, 4, 6 ],

    Is there an easy way I can sort these numerically? eg(4,5,6,9)

    Cheers

  • SOLVED:

    Change the line:

    JSON_MAIN: Set JSON_MAIN.CurrentValue to 9999

    to

    JSON_MAIN: Set JSON_MAIN.Path to 9999

    (which actually changes the value of the current path)

  • I am looping through a bunch of JSON values and if a value equals 1 I am trying to set it to 999 by using set JSON.CurrentValue.

    However, when I print the current value straight after this 'set' command it still prints as 1.

    here is the code as text..

    + JSON_MAIN: For each entry in "profile_"&Current_Profile&".achievements_unlocked"

    ----+ System: JSON_MAIN.CurrentValue = 1

    -----> JSON_MAIN: Set JSON_MAIN.CurrentValue to 9999

    -----> Browser: Alert JSON_MAIN.CurrentValue (This Alert prints 1???? I expect 999)

    Anyone know what I'm doing wrong?

    Thanks

  • Yes it was. Thanks for that ! :)

  • I have an object which is instanced in 2 layouts.

    When I try to delete one it says that this is the last instance of the object. ANd it goes on to delete it in both layouts.

    Is this expected behaviour? I want to just delete the individual occurrence in a single layout.

    Thanks

  • Perfect. Thank You!

  • I understand that I need to do the following type of thing (see events below), however what angles should i be looking for when swiping left. Swiping right is always somewhere between -10 and 10 degrees(weird numbers) but left seems to be either something positive like 180 or something completely weird like (minus) -165

    + Touch: Is in touch

    ----+ System: Touch.SpeedAt(0) ≥ 200

    // Swiped Left

    --------+ System: 190 ≤ Touch.AngleAt(0) ≤ 170 //WHAT ANGLES SHOULD I BE LOOKING FOR (these are wrong)???

    I would expect 90 degrees to be right and 270 to be left , but there seems to be some angle craziness going on.

    ?

  • I couldn't find any in the help and it would be most useful.