mrwyomingo-7bowchow0's Recent Forum Activity

  • i have found the issue it was the text != to "" that was doing this infinitely

    although the reload buttone seems to add a :0 every time

  • this is the current code

    the reload = 1 seems to not be working currently. i seem to have this issue with construct 3 alot where comparisons dont work is there something im not seeing?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ah yes i was under the impression that tag at would be give me the key itself as i couldnt find any other reference. except that of get which is used to get the value

    the format i wsa looking for is "key (the thing it is) adn value (the actuall vlue of the reference to the plugin)

    and im not even sure what tag at does but it appeares in the dropdown when you select which function to use

  • heres an image as i realise that the big block of text is not pealing.

    i realise this is very inefficient so any advice is greatly appreciated, just thought this would be good for debugging purposes as the console log is unavailable at my school for whatever reason

    heres what its currently looking like

  • when running the code the output is always null and includes the newline opperator \n. what i wrong here

    raw json thing :

    {"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"group","disabled":false,"title":"get sys info","description":"","isActiveOnStart":true,"children":[{"eventType":"variable","name":"index","type":"number","initialValue":"0","comment":"","isStatic":true,"isConstant":false},{"eventType":"variable","name":"e","type":"string","initialValue":"\"\"","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"text","type":"string","initialValue":"\"\"","comment":"","isStatic":true,"isConstant":false},{"functionName":"get sys info","functionDescription":"","functionCategory":"","functionReturnType":"none","functionCopyPicked":false,"functionIsAsync":false,"functionParameters":[],"eventType":"function-block","conditions":[],"actions":[{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"Canvas css height\"","value":"PlatformInfo.CanvasCssHeight"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"canvas css width\"","value":"PlatformInfo.CanvasCssWidth"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"canvas device height\"","value":"PlatformInfo.CanvasDeviceHeight"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"canvas device width\"","value":"PlatformInfo.CanvasDeviceWidth"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"connection effective type\"","value":"PlatformInfo.ConnectionEffectiveType"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"conection rtt\"","value":"PlatformInfo.ConnectionRTT"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"connection type\"","value":"PlatformInfo.ConnectionType"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"Device memory\"","value":"PlatformInfo.DeviceMemory"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"Device pixel ratio\"","value":"PlatformInfo.DevicePixelRatio"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"Downlink\"","value":"PlatformInfo.Downlink"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"Downlink max\"","value":"PlatformInfo.DownlinkMax"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"FPS\"","value":"PlatformInfo.FramesPerSecond"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"Hardware concurrency\"","value":"PlatformInfo.HardwareConcurrency"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"Renderer\"","value":"PlatformInfo.Renderer"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"Renderer detail\"","value":"PlatformInfo.RendererDetail"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"SafeAreaInsetBottom\"","value":"PlatformInfo.SafeAreaInsetBottom"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"SafeAreaInsetLeft\"","value":"PlatformInfo.SafeAreaInsetLeft"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"SafeAreaInsetRight\"","value":"PlatformInfo.SafeAreaInsetRight"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"SafeAreaInsetTop\"","value":"PlatformInfo.SafeAreaInsetTop"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"Screen height\"","value":"PlatformInfo.ScreenHeight"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"screen width\"","value":"PlatformInfo.ScreenWidth"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"TicksPerSecond\"","value":"PlatformInfo.TicksPerSecond"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"WindowInnerHeight\"","value":"PlatformInfo.WindowInnerHeight"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"WindowInnerWidth\"","value":"PlatformInfo.WindowInnerWidth"}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"WindowOuterHeight\"","value":"PlatformInfo.WindowOuterHeight "}},{"id":"add-key","objectClass":"Dictionary","parameters":{"key":"\"WindowOuterWidth\"","value":"PlatformInfo.WindowOuterWidth "}}]},{"eventType":"block","conditions":[{"id":"on-start-of-layout","objectClass":"System"}],"actions":[{"callFunction":"get sys info"}]},{"eventType":"block","conditions":[{"id":"for-each","objectClass":"System","parameters":{"object":"Dictionary"}}],"actions":[{"id":"add-to-eventvar","objectClass":"System","parameters":{"variable":"text","value":"\"\\n\" & str(Dictionary.TagAt(index)) & str(Dictionary.GetDefault(str(Dictionary.TagAt(index)),\"null\"))"}}]},{"eventType":"block","conditions":[{"id":"compare-eventvar","objectClass":"System","parameters":{"variable":"text","comparison":1,"value":"\"\""}}],"actions":[{"id":"set-text","objectClass":"sys_info","parameters":{"text":"\"\\n PRESET \\n\" & text & \"\\n [---END---]\" "}}]},{"eventType":"block","conditions":[{"id":"else","objectClass":"System"}],"actions":[{"id":"set-text","objectClass":"sys_info","parameters":{"text":"\"Somethign went wrong here\""}}]}]}]}

    more simplified version:

    • gets all the infro from platform info plugin stores info into a dictionary itterates through dictionary and appends it to a text box

    output:

  • this has been fixed, i was confused by the different ways js files are presented

  • i am doing a simple

    localVars.Variable1 = startup()
    

    and not getting any return from it with and without the export function (the export function gives me a module error)

  • im getting the module error for when i try to use export function on my js code.

    export function startup() {
     let text = "";
     
     // Add SYSTEM_values properties
     for (let i = 0; i < Object.keys(SYSTEM_values).length; i++) {
     const key = Object.keys(SYSTEM_values)[i];
     const value = Object.values(SYSTEM_values)[i];
     text += `\n ${key} : ${value}`;
     }
     
     // Add GAME_SETUP properties
     for (let i = 0; i < Object.keys(GAME_SETUP).length; i++) {
     const key = Object.keys(GAME_SETUP)[i];
     const value = Object.values(GAME_SETUP)[i];
     text += `\n ${key} : ${value}`;
     }
     
     console.log(text);
     return text;
    }

    i have tried as many of teh js tutorials i could find for the export function including the ad numbers things however when put into practice this is not working

    Tagged:

  • ok ty i will look through this

  • const GAME_SETUP = {

    Player_values : 1000,

    Destroyed_blocks: 0,

    Origin_counter: 0,

    Created_balls: 0

    };

    const SYSTEM_values = {

    Screan_wh: [screen.width, screen.height],

    BROWSER_INFO: {

    BROWSER_NAME: navigator.appName,

    Browser_Version: navigator.appVersion,

    Platform_info: navigator.platform,

    User_agent: navigator.userAgent

    }

    };

    for (let i = 0; i < Object.keys(GAME_SETUP).length; i++) {

    runtime.objects.sys_info.text.append `${"\n Game values\n"}`;

    runtime.objects.sys_info.text.append `${Object.keys(GAME_SETUP)}: ${GAME_SETUP[Object.keys(GAME_SETUP)]}\n`;

    };

    heres my cde, im new to js and have been trying my best to learn this. i wanted to add a logs page just so that i could add that to my project for school work any help is much apreciated

  • I'm fairly terrible at JavaScript but perfect at Python. If there is an apython plugin, it would be greatly appreciated, i would make attempts to learn it, but my time is limited

  • ty:heart: this will work well

mrwyomingo-7bowchow0's avatar

mrwyomingo-7bowchow0

Member since 12 Jul, 2022

None one is following mrwyomingo-7bowchow0 yet!

Trophy Case

  • 2-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

4/44
How to earn trophies