EiLiF64's Forum Posts

  • It works. Thank you so much.

    Back in '85 I started in Assembly and Basic. More recently C and JS. The concept of containers, templates, hierarchies and families is foreign to me. Families and Hierarchies are easy to understand. I always get hung up on templates and containers.

  • A follow-up with a cry for help :)

    Custom actions improve the structure and readabilty of the code. I am hung up on picking the correct objects when interacting with them. I tried picking by UIDs, by child. Nothing works. Only ever the first "prefab" placed on the screen will interact properly. A link to the project is here.

  • When I need some capability that’s available in standard programming languages, I implement it using JavaScript and synchronize it via global variables.

    Yeah, I am trying to avoid that.

    But I think there are a few other ways—for example, putting an array into a prefab’s local variable, or having a shared array with a column for each prefab and having a dedicated automation that processes actions for each prefab and its data from the array.

    Again, too much for my 62 year old brain :)

    Thanks for replying though.

  • Probably the closest C3 feature is "custom actions" which are like functions that are attached to an object type. It's just as easy to add as an actual function. Right click on the event sheet and select "add function" or "add custom action".

    I'll give "custom actions" a try.

    Besides that, you could probably implement the logic in some different ways that work better with C3 events. For example, You could skip functions entirely, or only use them to not have duplicate stuff.

    Already done that and it got messy. Maybe I am just too picky :)

    Much appreciated.

  • A couple of years ago, I started working on a classroom tool (senior-high/college) that simulates the electrical grid of a city/region. Link at the bottom.

    I sort of gave up when I failed to create prefabs (custom objects) the way they exist in Unity/Gdevelop. I started recreating the project in Gdevelop a couple of months ago, whith mixed results.

    I want to give Construct another chance to become my go-to tool for this project again.

    So: Is there a way to create complex objects and attach functions to them? An example would be to find out if a certain part of the "prefab" has been clicked on. Another example would be to send numbers or strings to be represented inside of it.

    I have the hierachy/families/object properties figured out but am missing a way to run functions.

    EiLiF - Energy is Life, Energy is Freedom

  • Bump.

    Everybody who uses ultra-wide monitors please upvote.

    Thank you.

  • Sounds like something I ran into a while ago.

    What dop2000 said plus:

    Layout:

    --- Projection: "Perspective".

    --- Vanishing point should be 50% x 50%.

    Layers that zoom:

    --- Scale rate: 100%

    --- Parallax: 100% x 100%

    Layers that don't zoom (GUI):

    --- Scale rate: 0%

    --- Parallax: 0% x 0%

  • Put echarts.js into the scripts folder, selected it as "Main script". Profit!

    More coffee coming your way :)

  • I got this to work locally where index.html and echarts.js are in the same folder.

    How would I do this in C3? I tries the HTML element but it's giving me grief. HTML and JS are my nemesis.

    This is the index.html file:

    <!DOCTYPE html>
    <html>
     <head>
     <meta charset="utf-8" />
     <title>ECharts</title>
     <!-- Include the ECharts file you just downloaded -->
     <script src="echarts.js"></script>
     </head>
     <body>
     <!-- Prepare a DOM with a defined width and height for ECharts -->
     <div id="main" style="width: 600px;height:400px;"></div>
     <script type="text/javascript">
     // Initialize the echarts instance based on the prepared dom
     var myChart = echarts.init(document.getElementById('main'));
     // Specify the configuration items and data for the chart
     var option = {
     title: {
     text: 'ECharts Example'
     },
     tooltip: {},
     legend: {
     data: ['sales']
     },
     xAxis: {
     data: ['Shirts', 'Cardigans', 'Chiffons', 'Pants', 'Heels', 'Socks']
     },
     yAxis: {},
     series: [
     {
     name: 'sales',
     type: 'bar',
     data: [5, 20, 36, 10, 10, 20]
     }
     ]
     };
     // Display the chart using the configuration items and data just specified.
     myChart.setOption(option);
     </script>
     </body>
    </html>
  • I think I am getting there. Not sure if I missed this in the manual, but I would have never figured this out without your help.

    The following seems to work. Still having trouble with one of the gauges, but I am hopeful to figure it out.

    I can now individually change the gray widgets' attributes:

    This is the code:

    Did I do it the right way (best practice)?

    I assume that IIDs don't change unless you switch layouts and create a bunch of other objects. How else would I be able track objects?

    Thanks for your continued support :)

  • I am using hierarchies to make widgets that display various object attributes.

    Given a parent picked by IID, how do I access the children?

    Manipulating the parent works fine. Manipulating the children affects all instances in the game.

    Do I need to pick the children explicitly or are they accessible when the parent is selected. Should I store the children's IID/UID in a parent instance variable for later access?

    The above image shows the parent (center) and it's children. Most children need to be manipulated (visibility, text, angle, ...)

  • Thanks for clearing that up.

  • I have uploaded my project to a test server. The timeline animation starts but no sound is played until I click into the window. I have tried "On start of layout: Browser focus", but no cigar. Any ideas what I am doing wrong?

    Sound works from within the editor and the WebView2 export of course.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is a straight-up bitmap zoom. There may be better ways to this in C3. I am no expert.

    For crisper results I would render in an off-screen buffer at multiples of the screen resolution and then copy the "magnified" image. No matter, all of this is rather resource intensive.

    | Global number mag‎ = 3 + System: Every tick -> System: Take snapshot of canvas (PNG, quality 75, offset Mouse.X-50, Mouse.Y-50 size 100 x 100) -> MAG_PRINT: Load image from CanvasSnapshot (Resize to image size, cross-origin anonymous) -> MAG_PRINT: Set scale to mag + Mouse: On movement -> MAG_READ: Set position to (Mouse.X, Mouse.Y)

  • Right-click on the Fonts folder in the project bar and import a font of your choosing. WOFF seems to be the preferred type, but True Type (ttf) will work as well. Here is a link to a WOFF-Converter.

    My project uses Bahnschrift and Font Awesome 6.

    You will have to rewire all text objects by selecting the imported font.

    Now when you export, C3 should include the font in the package.