goblynn93's Forum Posts

  • By complicated I meant the Browser log stuff was doing a lot more than I needed.

    I have built a similar loop but for some reason it runs forever... It should run 11 times and stop but it just keeps going and going forever if I let it go...

    ***

    AHA! I needed a trigger... or else it just keeps looping 0-10 0-10 over and over...

    Making progress thanks for the help!

  • This is much more complicated than I need but definitely covers almost every possibility I would ever need.

    I think that because all I need is the Array.At position for any empty cell I won't need to do the Log In Browser... but wow that's a cool trick. I didn't know you could do that.

    Thanks for all the help! If I can't figure out the rest from here I should just give up and learn to drive a big truck

  • After re-reading the OP It seems you want to check for "X", not empty cell.

    I was using the X and O as an example...

    Yes its a 2d array.

    The actual array looks like this:

    0 text,text,,text

    1 text,,,

    2 text, text, text, text

    3 text,,,

    4 text,,,text

    5 text,,,text

    6 text,text,,text

    and I am hoping to scan the array and build a second array that tells me which entries have text in the last column. The resulting array would look like this:

    0 0

    1 2

    2 4

    3 5

    4 6

    I hope this makes sense... I think I can figure it out from what you've posted though...

    Thanks!!

  • Interesting. That is close to what I've tried and failed but different in a few key ways... Thanks! I'll give this a try.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have an array being filled with data using AJAX and CSV>ARRAY and this works great.

    I would like to scan the entire array and build a secondary array that tracks empty entries and their position in the original array.

    I am trying to build a For or a While or a For Each loop to do this but I am failing.

    I am using len(Array.At(CurrentPosition, 3, 0)) > 0 to look for empty array cells in the 4th column of each part of the For loop but my Construct build is simply not working.

    0- XXXX

    1- XOOX

    2- XXOX

    3- OOXX

    4- XOXO

    5- OXXO

    6- OXOX

    7- XOOO

    8- OOOX

    9- OOOO

    For each Array.Entry IF Column 3 = X then Push To Back the Current.For into New.Array

    This would result in the New.Array of:

    0- 0

    1- 1

    2- 2

    3- 3

    4- 6

    5- 8

    Thanks for looking!

  • I guess I can fix this by requiring the app be run from the C: root and not from the Desktop... its not hard it just means a lot of phone calls from camp counselors asking "what's a c:? And what's a root?"

    Thanks for the help I think I am less frustrated and closer to a solution.

  • A single functioning example of pulling a local image from a file and displaying it on-the-fly, while the app is running, would end all confusion.

    Unfortunately there are no clear examples of this working on the forums or in the tutorials.

    Its quite possible that I'm just giving bad links to the images... If I give the link as a full complete link it works:

    C:\Users\gobly_000\Desktop\LoadTest\win32\Test.png

    but a partial link like ".\Test.png" (look in the same folder as .exe to find the image)

    or "..\Images\Test.png" (go up one directory and then check directory Images for file Test.png)

    In HTML this is easy... I use short links all the time but so far I have not gotten the same trick to work with C2. When a user hits my main folder and runs my Index.HTML I can then point to Images folders and Data folders and setup all kinds of folder structure and browse through it all from the root (can even use ~/ to return to root!)...

    Where is C2 running its default starting folder location from? If its not from the same folder as my .EXE then it would explain why I am having so many failures!

  • Load VIA Ajax??

    Ok now I am incredibly confused... this is not making any sense at all...

    what does AJAX have to do with loading images into the Tiled Background????????]

    This should not be this hard.

  • I am totally lost and failing then. The manual is really poor when it comes to explaining how to use this.

    I don't want to do this "At Start Of Layout"

    But trying to do this on-the-fly is not working.

  • Can you please explain "At RunTime"?

    I am believing "At RunTime" to be "when the app starts" or "On Start Of Layout".

    But then you say I can load images "when they are viewed"... this sounds like a conflict of information.

    It sounds like you are saying:

    Load the images into Tiled background layers as the app starts.

    Display the loaded images when needed.

    That doesn't at all support adding more names and images to the game after its already running...

    I need to add more images and names to the game after its already running.

    The names are easy.

    The images -should- be easy too... the names of the images match the names of the kids so I should be able to pull an image using -- KidsName.Array&".png" -- but this is simply not working at all.

    I've followed the tutorials and the manual and all the information is so vague that I can't even figure out if this is -supposed- to work or not!

  • I have an app that has around 3000 pictures associated with people's names. This is a custom game for a kid's camp. It runs on a self contained Windows computer with the only user interaction being the game itself.

    I want to be able to show their name and photo in my app.

    I will not have the pictures ahead of time, more pictures and names will be added all the time, and all I know is what folder they will be in and that the name of the image will match the person's name.

    How should I handle this? Trying to load 3000 images "At RunTime" doesn't seem to be a slick way to handle this.

    "Load Image From URL" seems to be the way to go but so far I can't get this to work unless I "Load Image From URL" at "On Start Of Layout" .... How about "While Layout is running" ??? Can I do that ??

    Seems like I should be able to do this for handling dynamic, update-able content in my games yet I can't see any method to handle this...

    I need to be able to load an image into my "game" at anytime I want and show it. Pre-loading at "RunTime" is extremely cumbersome, at best...

    It would also gives my users some level of easy customization, like replacing sounds in the old Maelstrom game on Macintosh...

    Thanks!

  • I may be off-base here but calling Project Files "external files" doesn't really seem right. Being able to access "external files" kind of implies that I should be able to access files that are completely external to the Project File. These are more like "Referenced Files".

    Unless I am missing something adding more image files to an app post-export is not exactly easy or user friendly.

    But this is EXACTLY what I need to do. The logistics of needing to include all my images as Project Files or as Animation Frames is severely limiting.

  • Ok this works for me as well...

    But there are some major differences in the way the app works as well. Using the full link in my app doesn't work.

    Do the images have to be loaded On Start Of Load Up? I may possibly have 1000s of images... trying to load that many images is insane. I need to call images as-needed on the fly...

    Does this work with local images as well? I am not sure where the default 'Files' location is... there is no 'Files' folder in my Node-Webkit export folder, nor am I aware of any 'Files' folder in the C2 installation.

    Thanks for the help so far!

  • I am confused... I have to import the Test.png file into the project? At that point I'm not calling a URL I'm calling a Project File...

    I can't call images from the web and display them without knowing exactly what they are ahead of time (all cross-domain issues being considered...) ?

    URL images have to be pre-loaded into the Project File?

    I guess don't understand the purpose of "load image from URL" then...

    Or I am missing some concept...

    I placed the Test.png in the root folder of my project Win32 export folder...

    F12 does not get me a debug because I am using Node-Webkit export. Again I may be missing something but I can't seem to get F12 to do anything...

  • How do I add an image to my app after it has already been exported as a Node-Webkit? I cannot add these images as Project Files but I still need to load and show them.

    I need to deliver an app to my client and they want to be able to add more images to the app in the future.

    This leaves me stuck, forced to update their app for them anytime they want to add more pictures unless I can figure out a way to do this.

    I have a CSV with all the image names and I can manage the data with an array. After that I need to be able to call the images from the stored names in the array.

    I have no idea how many pictures will be added or what they will be called.

    Where should l look to try and build a solution for this?

    Below is my original post

    ****************************

    I can load an image from a URL/URI but how do I display it?

    I have followed this tutorial: https://www.scirra.com/tutorials/541/ho ... from-files

    And made this tiny app:

    https://drive.google.com/file/d/0B1xzGDQ6NDI-TElEcTZWRHVmMlk/edit?usp=sharing

    But I can't figure out how to show the image after its been loaded.

    The Manual says that:

    Load an image from a given URL. The current animation frame will be replaced with the image. It is not shown until the image has finished downloading, and On image URL loaded triggers.

    and:

    On image URL loaded

    Triggered when Load image from URL finishes downloading the image and is ready to display it.

    My Sprite has only 1 animation frame... so when its complete and ready to display how do I tell the Sprite to show the image? Or what do I tell to show the image?

    Does anything change then using Node-Webkit?