blackcrypt's Forum Posts

  • For those of us that don't have android can you explain the game a little?

  • Keyboard : I can run + jump going left, but I can't run + jump going right. That's quite annoying.

  • Excellent - Is it coded in Construct2?

  • Wow, I have been looking for game data save / load solution all week! I don't like the idea of webstorage - it sounds too temporary to me. I'll test it out though. I didn't know about FileChooser though.

    I don't really want the user to choose a file - I just need to be able to save several files in the root of the game folder - perhaps in a 'LevelPack' folder. I'm kind of working towards a good solution.

    Your topic helped. Thanks.

  • Valerien - thanks dude

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > ...

    > And you need to fix your json file. You are missing quotation marks between your fruit names.

    > It will work once you fix those two things.

    >

    > ...

    >

    I already told you why it's not working. You can't expect people to just fix your issues for you. You need to learn why there's an issue and be able to correct it.

    Find your json file inside your project open it in notepad and add the missing quotation marks.

    Yes, I already did that - You'll notice that my json file is included at the top of my last post. I can expect people on a community forum to help and sometimes just look at the 'code' and fix it so I can see what's wrong at my end. Those that don't want to do that can opt to NOT reply. Perhaps you fall into the latter group?

    I have also minified the FruitNames.json file contents to be extra sure!

    {"c2array":true,"size":[10,1,1],"data":[[["Apple"]],[["Banana"]],[["Cherry"]],[["Pepper"]],[["Grapes"]],[["Pumpkin"]],[["Star Fruit"]],[["Strawberry"]],[["Tomato"]],[["Peach"]]]}[/code:drdmpi7m]
    
    So, as it stands, I have done everything that I think I should have done, but the fruitnames still do not appear - the array is empty.
    
    [EDIT] Problem solved - and it was simply a case of re-importing my FruitNames.json file into the project. I assumed (wrongly) that the file was retrieved at runtime from disk.
    
    [EDIT] I have also noticed that beautfied json does not work in C2.
  • {
        "c2array": true,
        "size": [10, 1, 1],
        "data": [
            [
                ["Apple"]
            ],
            [
                ["Banana"]
            ],
            [
                ["Cherry"]
            ],
            [
                ["Pepper"]
            ],
            [
                ["Grapes"]
            ],
            [
                ["Pumpkin"]
            ],
            [
                ["Star Fruit"]
            ],
            [
                ["Strawberry"]
            ],
            [
                ["Tomato"]
            ],
            [
                ["Peach"]
            ]
        ]
    }[/code:28r9ycza]
    
    As you can see below, I tried both [b]Load from JSON string AJAX,LastData[/b] - and by using the tag - neither seems to work.
    
    [img="http://i445.photobucket.com/albums/qq178/blackcryptclan/ScreenShot_zps5f70e154.png"]
    
    Then after using Download as JSON data with filename "test.json" the file contains...no fruit names   
    
    [code:28r9ycza]{"c2array":true,"size":[10,1,1],"data":[[[0]],[[0]],[[0]],[[0]],[[0]],[[0]],[[0]],[[0]],[[0]],[[0]]]}[/code:28r9ycza]
    
    Something is not working and I don't know why - I've done everything I know.
    
    This is why I suggested someone might like to download the capx and fix the issue so I can see what I did wrong.
  • Thanks guys, but this already got fixed - see last entry on page one!

    But if you are in a helping frame of mind I have another topic that seems to be invisible to most forumgoers...

  • Thanks for your answers, but I don't want to detect when a key was released - this would assume the key has been pressed already - also I think 'released' is a one shot test which will only trigger after the key has been pressed - acts as a kind of trap - the action will only occur after you lift your finger and not as soon as you press the key. The difference being that one way will act like autofire and the other would require continuous tapping of the key - I want the autofire behaviour - I care about the finger joints of my users

    I'm still searching for a way to implement the logic...

    If the player is pressing the left arrow - OR - the right arrow then set gravity to 0 - ELSE - set gravity to 5.

    Ok, I sussed out what the issue was - and it was the difference between Pressed and Down.

    When I used If key is pressed I get a little green arrow next to the event and I'm unable to place an Else event directly after it - I switched to Key is down and bam! I can pop the ELSE right in there.

    Can I just say thanks for taking the time to reply to my post, but I don't think adding extra events to solve a problem is the way forward especially as the issue was my lack of understanding of the event system (maybe just where pressed / down are concerned maybe).

  • I will still have to test for the keyboard press which is a triggered event - the ELSE just is not logical there because it will never be run because that part of the code will ONLY be 'run' when a key is pressed, That's what the little green arrow means.

  • I get the same 'not valid here' if I put it under 11 (as event 12).

  • I can't get it to work. I read all the relevant stuff in the manual but the manual doesn't tell you how to achieve these things from a UI perspective - ie 'click this and drag it there'.

    I want to achieve :

    If left or right key is pressed set gravity to 0 ELSE set gravity to 5.

    I know that Else can't go there because it can't go under a triggered event, but how do I achieve this? How do I make the keyboard detect a non-triggered event?

  • I was going to ask how he got his theme like that - looks cool.

  • Apologies for the self-bump, but can someone please have a look at my capx?

  • He's asking for a top-down rain effect, which makes me feel a little silly after making a tutorial for him - https://www.scirra.com/tutorials/1368/rain-splash-effect - perhaps it will help someone else.

    I'll have a think about it and see if I can add a top-down effect to my tutorial.