vila4480's Forum Posts

  • If you added the files from inside c2 the second should work.

    I was a bit confused by your reply. I can't seem to be able to add a file to the project... I suppose this could possibly be done using XML but to be honest i have no idea how to do that or if there's an easier approach.

    Instead I opted for the FileChooser object and then I asked AJAX to fetch the FileChooser's picked file's URL.

    However, this forces me to pick a file every single time I want to use my app since it does not allow for a default file to be picked at the start of the layout.

    This does work well.. but it is not viable for me to have to have to pick the same file every time just to get a proper URL to the file (a URL that works -> since I can't get my previous examples to work!).

    I noticed that the FileChooser's URL value is something like "Blob:http://localhost:50000/3e94a87df-6532-4413-n187-996830dnb630f" and it keeps changing every time I load the file manually.

    This is what I've got right now:

    ->Can there be a static URL to this local file?

    ->And how would you load it from inside Construct?

    Thanks!

  • R0J0hound you're being extremely helpful as usual and you saved me several times now - so I really appreciate your reply!

    I believe you may be right.. I also read this article on Making AJAX requests cross-domain which I'm not sure if it may be causing issues.

    Update: got this error which definitely confirms it:

    I have one question though when using your method: I tried adding the file to my .capx folder and called it like this:

    or like this:

    None of those methods worked at all... am I doing something wrong when loading a local file?

    I was in preview and using a local .capx file/folder.

  • Hi guys!

    Up until last wednesday i was able to use my code without any issues whatsoever.

    Now the files i was requesting turn out empty in my project. I checked the Dropbox URL and it is dead (as Dropbox dropped that direct access functionality recently).

    However, even after uploading this file to an FTP server I'm still not being able to read the file. I read something about MIME types conflicting with AJAX being able to read files?

    In other words:

    This no longer works:

    This does not work:

    You can try and access that last one yourself... you'll see a list of usernames but AJAX can't seem to fetch them.

    No other changes were made to the code whatsoever.

    Someone please help! All of my projects revolve around files and are no longer working since dropbox changed their ways - even though I can access them via an alternative method.

    Thanks for the tips in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd love to see more info and an updated capx on this topic

  • Awesome replies thank you guys!

    I think my method is working rather well but theres still some bug fixing to do regarding some other details!

    Ill get back to this later on.

  • So this is my current plan to tackle this problem:

    1. Separate sentences by * [DONE]

    2. Ignore exact clones [DONE]

    3. Importing sentences to a temporary array [DONE]

    4. Extract the username from each array cell

    5. Import usernames to DB

    6. Extracting arguments from each array cell and overwriting the DB for each username

  • Hi guys, I've got a text file with a few lines like so:

    ViLa4480»5-6*
    ViLa4480»5-6*
    ViLa4480»1-2*
    Manimani»5-64*[/code:1t185mtn]
    
    The idea is that I've got a few usernames and two arguments for each. My intention is to put them in some sort of database (be it an array, object or, preferably, TaffyDB). But I only want one registry per username. For the example lines above, I would like to see only 2 registrations with 2 arguments each:
    [code:1t185mtn]ViLa4480 1,2
    Manimani 5,64[/code:1t185mtn]
    
    I've built some code that is able to do this for simple usernames (no arguments), based on the "*" as an identifier between names, but i'm still not able to split the arguments into their own cell in the database and prevent them from repeating themselves.
    
    What would you guys think is the best approach to deal with this situation?
    
    Thank you in advance,
    ViLa4480 - the newbie programmer!
  • Awesome!

    I wish I had the budget to hire you someday

  • If this is caused by a bug then it definitely is not closed yet.

    I hosted my export on an external server (awardspace) and i get a black screen both on Chrome and Firefox.

    Am I doing something wrong?

    Please help!

    EDIT:

    Figured out that images aren't being loaded.

    Trying to open up those images gives me a Awardspace (my host) error page... So I'm guessing that they don't allow hotlinking to content in other folders. I have also confirmed that .txt files work fine but .png files don't.

    With Dropbox and Google Drive out the window (they removed hotlinking for htmls and such), have you guys got any tips on how to fix this?

    Where can I host my game allowing for external images to be loaded?

    EDIT:

    Following a recomendation on this forum: https://www.bitballoon.com/ hosts everything without a hassle.

    Thank you guys! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • When I launch the pool example all I get is an empty pool. No fish whatsoever... any ideas?

    The test example does show different players but it works terribly bad when two players connect with the same name or leave the session... I can't even join the same room unless it is the default one.

    Could someone help me out? I have no idea on how to fix this.

    If you need more info on my issue please ask away.

    Thanks!

    Nevermind I figured it out: the region was set by default to EU and apparently that does not work. I set it to US and it works perfectly now, thank you.

  • When I launch the pool example all I get is an empty pool. No fish whatsoever... any ideas?

    The test example does show different players but it works terribly bad when two players connect with the same name or leave the session... I can't even join the same room unless it is the default one.

    Could someone help me out? I have no idea on how to fix this.

    If you need more info on my issue please ask away.

    Thanks!

  • Awesome! Thank you!

    I'm really happy with the first menus on my game!

  • Hi!

    I'm really fond of your work and having just bought it I would like to include it in my next game.

    However, I'd like to know which font you used so I may adjust the text to better suit my project. Is it all hand-made?

    Thanks!

    -ViLa

  • I would prefer to allow for my character's clothing to be customizable - but to be honest, i dont mind if it is stuck in one clothing style, as long as it is synched so that it looks the same between all peers and host!

  • Hey guys!

    Recently i started building my own multiplayer game but i came across a small issue.

    I want the players to be able to pick different clothes for their characters, and, as such, i'm using a different animation sequence for each clothing pack (no individual parts, just one full outfit).

    For my test i'm just setting the clothes to be randomly picked but the problem arises when the game starts and each character has different clothing in each instance of the game.

    In other words, in a game with 2 characters/players, one player sees clothing item A and B while the other player sees C and D.

    I was trying to define an instance variable for the player/character object that would be a reference to the clothing value. But apparently the synch between players isn't really working.

    I tried following the tutorials, read the reference, but i failed to understand how synch variable works. Can someone help me out?

    Thank you so much,

    -vila4480