part12studios's Forum Posts

  • Hi there,

    I'm making an app for kids that has a custom mouse graphic. this works fine with a windows 8 machine with a mouse.. but the trouble i run into is figuring out a good way to hide the mouse in all the layouts.

    I would like the app to show the custom mouse when the mouse is in use and when touch is in use hide the mouse custom icon..

    i've tried a couple of things and it just doesn't seem to be working.. I just can't seem to find a good logical system that can detect if the user is using a mouse and clicking things or touching things.

    There must be some efficient / straight forward way to allow a mouse to be hidden if touch is used..

    otherwise what i end up with is this static mouse that appears wherever i touch..

    Thanks!

    Caleb

  • Ok so yea I went to a weekly event over at the Cambridge Microsoft office and worked with one of their evangelists who works a fair amount in C2 and we managed to figure out how to get what I need (which if course you've been saying, but I wasn't understanding completely).

    {

    "c2array":true,

    "size":[4,2,1],

    "data":[ [["Joke1"],["Punchline1"]],

    [

    ["Joke2"],["Punchline2"]], [

    ["Joke3"],["Punchline3"]], [

    ["Joke4"],["Punchline4"]]

    ]

    }

    Once i got those right and understood how to properly made a 3d array call I now have it working as I was hoping for. If anyone finds this and needs some help let me know and i'll explain what i understand (which is the bare minimum, but i think what i can do now with this will still be a substantially useful feature.

    Once again the C2 forum community has been amazing. Thank you so much everyone for your help with this! I'm sure I'll want to do more fancy stuff in the future with this, but for now i'll make this work!

    Sincerely,

    Caleb

  • ah yes i was going to say, the demo that was provided for me was a file.. but watch out to not click always allow.. it freakin' goes on a save frenzy.. had i think bout 80 files generated on my computer before i could end task!

    Caleb

  • sure thing.. here it is https://www.dropbox.com/s/dvfxbtsi4rk7d1j/PunTest.capx

    yea i just want the simplest way to call on text information and put that information where it needs to go. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Thanks!

    Caleb

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lol i had the same thing happen.. i was going to share what i was experiencing with my setup.. which i'll post now.. just so you know.. but i'll read and respond to your deeper response once i read through it.

    -----

    yea i pretty much follow you but when i do Array,At(1) i get an error..

    here is what i have so far https://www.dropbox.com/s/tp0x6fgkskac5 ... 0setup.PNG

    this current setup results in this:

    click the button.. the text field shows "Joke1"

    if i make (0) a (1) i get this error https://www.dropbox.com/s/aiui94i2cu58297/error.PNG

  • a small update.. i tried to use Array.At(1) and got an error.. thinking i could access "Joke2" by calling on (1).

  • ok so i have some of this understood, but i'm confused by the example because it just seems like it has a lot going on that i don't need and i'm not clear where what i want ends and what i don't want begins.. because its kinda all woven in together.

    I have a json file that is imported in my test project.. i was able to display the the first value by using

    Array.CurValue and that's way cool.. it displayed in a Text object (standard text, not sprite font) "Joke1"

    but what i don't know how to do next is how to call on any of the values below.. this is what i have setup now:

    {

    "c2array":true,

    "size":[4,1,1],

    "data":[[ ["Joke1"],

    ["Joke2"],

    ["Joke3"],

    ["Joke4"]

    ]]

    }

    it seems like if i could just figure out how to access joke 2 3 and 4.. that would be all i need to know to be able to then use what i do know to call on random text from the list above..

    Sorry to be so dense lol, this is just very new to me and having never used sprite fonts before or arrays it's just made the sample project tougher to discern.

    Thanks!

    Caleb

  • awesome thanks! i'll keep at it with this new info! Thanks to you both for your help with new (and kinda confusing to me) subject

    Thanks!

    Caleb

  • ok i'm trying to break this down to better understand the syntax.. i need a joke and punchline that would go in different text objects.. so i imagine i'll need to make two json files.. is this the right syntax below?

    {

    "c2array":true,

    "size":[3,1,1],

    "data":[[ ["Joke1"],

    ["Joke2"],

    ["Joke3"]

    ]]

    }

    what is the purpose of "c2array"? is it a unique name? I don't cee "c2array" anywhere in the event sheets. If I import two json files i just want to be sure that c2array name is something that either needs to be unique or in common.

    also you mention X, Y, Z? i'm only used to that being used in terms of 3d coordinates. what would the x y and z represent in this case with c2?

    Thanks!

    Caleb

  • ok thanks! Yea otherwise my txt files would be default to ANSI.

    can anyone explain some of the values found in this json file? specificially the header stuff. c2array is fine i guess, but what does "size" mean? 13,6,1?

    {

    "c2array":true,

    "size":[13,6,1],

    "data":[[ I do see he has 13 cards (Card00 through Card12) but i don't understand what the 6 and 1 represent. below the data line you see this ["Card 00"],

    ["Content 01 - Card 00"],

    ["Content 02 - Card 00"],

    ["Content 03 - Card 00"],

    ["Content 04 - Card 00"],

    ["Content 05 - Card 00"]

    ]

    I do see 6 rows although one of them is he header.. not sure if that matters.. but if that is the case then what does the 1 represent in the three numbers "13,6,1"?

    Then i follow the idea that DeckCards1 gets completed.. move on.. I see load Json strong "AJAX.LastData" is this a commonly used command to simply put all of the data that was loaded from the CData2.json into an array?

    I've never used sprite fonts before. I was just looking to use plain text fields for displaying data, but I think I can see what's going on. trying to rebuild something using this as a guide.

  • ok i'm digging in it now. I saw you have a "json" file in there. is this simply making a text file and changing the extension? I was able to open it with wordpad and it looks good so i imagine this is true and will move forward on that assumption but i at least wanted to mention it.

  • sweet thank you so much for this sample! I'll be tackling this head on tomorrow (monday) and report back how it turns out!

    Sincerely,

    Caleb

  • I will definitely look into this and let you know if I get hung up! Thanks for the added explanation! you've been a great help!

    Sincerely,

    Caleb

  • ok so i have the cvs plugin and i see i can load a "cvs string". I have a test.cvs file I exported from Excel.

    I'm just not clear how i "read" the data in a given text file from json. Where would the file reside so that when the app launches it grabs the data? would it go in the generic "file" folder?

    for example.. i found this cool site thanks to a coder buddy of mine.. http://www.convertcsv.com/csv-to-json.htm

    and it gives me this json data:

    [ { "Joke 1":"Joke 2", "Punchline 1":"Punchline 2" }, { "Joke 1":"Joke 3", "Punchline 1":"Punchline 3" } ]

    but then it's like.. where do i stick THIS? and how would I access it still.

    I didn't see any tutorials that talk about "import data ajax"

    Maybe XML would be possible? the code above reminds me of it a little.

    you mentioned "I found putting data in json and loading it into dictionary worked well." how do you actually do that?

    Thanks!

    Caleb

  • yea that sounds good. and i think if you look at the play options there is something in there that lets you know the sound is done playing..

    yea if you go and add an event you'll see audio has an "On Ended" which could allow you to string sounds together based on sample length rather than time.. just an option to check into