timcs's Recent Forum Activity

  • [quote:3mzhtqcv]Other than that from the glimpse of it so far I can only say why just Chrome? I use Opera and Firefox and it does not operate on either of these. Also I updated Chrome on my phone but this only goes to version 56 so I could not run it on that either

    Thanks for the feedback! Chrome only for now as it's the only browser that supports all the advanced features we're using (nearly) out the box. If you load it in FF or Opera, it will show you what specific features the browser is missing exactly.

    We don't see any reason why other browsers wont be able to support it in the future. Hopefully not too distant!

    Tom

    I cannot open it at all in Opera and Firefox so there is no chance of testing at all there. As for my Android phone any reason why it would not open on the latest version ?

    I do hope the collision point is looked at soon because this will be a BIG selling point for me to move to C3!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not a bad interface as far as I can tell at this stage, seems to operate quickly and looks and feels no different to the desktop version in my opinion, I would like to see however the ability to have a better collision editor so that a sprite can have multiple collision points and also not to have to rely on the collision polygon to be used for the drag and drop . This has only ever been the issue I have had with C2 the fact that the collision polygon is where the dragging is based on and that there cannot be multiple drag points.

    Other than that from the glimpse of it so far I can only say why just Chrome? I use Opera and Firefox and it does not operate on either of these. Also I updated Chrome on my phone but this only goes to version 56 so I could not run it on that either

  • thanks oosyrag for your answer on this it explains why I was struggling with this and will explain why my below method works as well.

    However , I have found a work around for this by storing the string from the array into a single text variable while removing the ; at the same time and then stripping out the text before and after the - from that variable when storing it into the text objects.

    A little long winded but it works but I will consider to try nested tokenats

  • Hi

    I am currently storing and loading using ajax various text files for my project. The format of the text file in this example is as follows

    Text 123 - Text 456;

    Text 789 - Text 10112;

    |

    So each line has a - and a ; as a delimiter , the - allows for the two texts value to be split out and the ; is for the end of that line. The | is a record separator . So I load this format into the array using the | to store each record into each cell of the array.

    My problem is trying to get the text before and after the - . On the first line this works :

    Textobject1.Text = trim(tokenat(array.at(counterpos),0,"-"))

    Textobject2.Text = trim(tokenat(array.at(counterpos),1,"-"))

    But when I try and use this logic for the second line :

    Textobject2.Text = trim(tokenat(array.at(counterpos),2,"-"))

    Textobject3.Text = trim(tokenat(array.at(counterpos),3,"-"))

    Textobject2 does not equal the value before the - but the value afterwards and textobject3 shows the value from the next line (which is not here in this example).

    My reason for holding the data in this way is I am storing each type of language verb per record and then the various definitions of that verb e.g. I am , they are etc on each line.

    Any help to solve this would be appreciated

    ** EDIT **

    Still struggling to get this to work so if I am using tokenat incorrectly or if there is another/better way of doing this I would appreciate if someone could advise on that. Not sure if this is any clue to the problem but the file is loaded via an included event sheet and that sheet then calls the function from the original sheet that called it and that the file is saved in a UTF-8 format to preserve the accents for the language.

  • Would like to debug the project. Has me puzzled at this point.

    Do you trust me enough to PM me the project?

    99Instances2Go , well I am either imagining things or in the throws of changing things about , it now appears to be working. So hopefully without any additions to the events just simply re-enabled some of the logic that I disabled which was me just trying things out got it to work. Hmmm will have to watch this carefully next time

    Thanks anyway

  • 99Instances2Go

    The first image is from the main event sheet and yes there are other events there as well. However the other events are called based on functions so until the GetRandomQuestions is called, the others do not start.

    In the second image, this is the entire contents of that sheet and that as you can tell is the sheet I am calling to load the files. I hope this answers your questions

    When I get chance I will post that function (GetRandomQuestions) but I know that it worked when I called it from within the same event sheet

  • Included event sheet acts as its events are in the base sheet.

    You gots to have some logic flaw.

    Maybe you have the 'Ajax on unique tag load completed' as a sub in the function ?

    Or you forgot to reset the parameter in 'if parameter equals 1', so it keeps calling the function until 'load is completed'. Actual executing the 'load' several times in a row ?

    Does the below screen grabs help to see what I have done wrong ? :

  • Hi

    I am probably misunderstanding what can and cannot be done when using the "include event sheet" method. At the moment my project is getting too big because I am , in each event sheet, loading files in and reading the data via ajax.

    So I thought it would be a good idea to create an event sheet that allowed for the handling of loading files. Then each event sheet would call a function from that included event sheet (say call it B for now) and that function had a parameter to identify each call.

    this all sounded good , I tried it with one call from one sheet to start with. The logic goes as follows :

    On start of layout - Call function from included event sheet (B) with parameter (1)

    (In included event sheet):

    on function call - > if parameter equals 1 - load required file via ajax using unique tag.

    Ajax on unique tag load completed

    -> set variable recordcount(from called event sheet) to tokencount(look for record marker from ajax loadlastdata)

    -> array(from called event sheet) set size (recordcount,1,1)

    -> subevent -> loop through loadlast.data to populate array with data

    -> blank subevent after loop finished - call function from called event sheet to load data to sheet.

    The problem I have is that the final call to the function from the called sub even seems to loop. Now this logic was originally in the event sheet that was calling the included event sheet before the include event sheet even existed so I know this logic works. Also if I enable this code back in the original called event sheet the looping stops.

    I have also tried to call the last function at the end part of on start of layout but this does not work as no data is loaded to screen.

    Any help would be appreciated.

  • Hi

    I know that phonegap is not every ones favourite compiler for Construct 2 projects but in general I find the resulting compiled apk for Android is more of a realistic file size over that of Intel XDK.

    So I still want to use phonegap and on purchasing a plugin for Construct 2 which is the Cordova SQLite Database I have been really struggling to get this to work. On being in touch with the author of this plugin he has not really tried this via phonegap and pointed me in the direction of the phonegap guide on how to include a cordova plugin.

    I really nearly gave up on this after trying various xml settings within the config.xml before uploading it to phonegap with little luck. As there have been many attempts at this with different errors it is hard to provide one definitive message that I get from Phonegap , however if someone could provided ideas on what I need to do I would appreciate it

    ** EDIT **

    On making further tried I found that one of the issues is that the plugin reference on the authors site had a capital C in the name now that I have corrected that I get the following error message :

    Error - Plugin error (you probably need to remove plugin files from your app): Fetching plugin "cordova-sqlite-storage@1.4.4" via npm Installing "cordova-sqlite-storage" at "1.4.4" for android Error during processing of action! Attempting to revert... Failed to install 'cordova-sqlite-storage':CordovaError: Uh oh! "/tmp/gimlet/26548780/2479767/www_android/project/cordova/plugins/cordova-sqlite-storage/node_modules/cordova-sqlite-storage-dependencies/libs/sqlite-connector.jar" not found! at copyFile (/tmp/gimlet/26548780/2479767/www_android/project/cordova/lib/pluginHandlers.js:219:36) at copyNewFile (/tmp/gimlet/26548780/2479767/www_android/project/cordova/lib/pluginHandlers.js:250:5) at install (/tmp/gimlet/26548780/2479767/www_android/project/cordova/lib/pluginHandlers.js:43:17) at Object.process (/tmp/gimlet/26548780/2479767/www_android/project/cordova/node_modules/cordova-common/src/ActionStack.js:56:25) at PluginManager.doOperation (/tmp/gimlet/26548780/2479767/www_android/project/cordova/node_modules/cordova-common/src/PluginManager.js:117:20) at PluginManager.addPlugin (/tmp/gimlet/26548780/2479767/www_android/project/cordova/node_modules/cordova-common/src/PluginManager.js:147:17) at /tmp/gimlet/26548780/2479767/www_android/project/cordova/Api.js:254:18 at _fulfilled (/tmp/gimlet/26548780/2479767/www_android/project/cordova/node_modules/q/q.js:834:54) at self.promiseDispatch.done (/tmp/gimlet/26548780/2479767/www_android/project/cordova/node_modules/q/q.js:863:30) at Promise.promise.promiseDispatch (/tmp/gimlet/26548780/2479767/www_android/project/cordova/node_modules/q/q.js:796:13) Uh oh! "/tmp/gimlet/26548780/2479767/www_android/project/cordova/plugins/cordova-sqlite-storage/node_modules/cordova-sqlite-storage-dependencies/libs/sqlite-connector.jar" not found!

  • The button object has its own "on clicked" condition. Maybe that's what you used before?

    Yes you are right and again egg on face , this is what happens when the brain is tired

  • Got this worked out, it seems that either using the touch or mouse click event on a button object for some reason is not working, however adding a sprite and clicking on that does action the commands that I need it to do .

    I am sure I have used the button object before with similar set ups and not had the problem

  • It is normal for a global variable to be static by default.

    Static means that the value it contains is stored and stays the same between an execution tick to another (which is what you do want from a global variable, for the value it contains to be stored and not reset each tick).

    What prevents from modifying the value is the fact that the variable is Constant (its value cannot be modified at runtime).

    Hi Kyatric

    Thanks for your reply, I had looked at what it was set to but it is not constant so I am really perplexed to why it will not increment in value

timcs's avatar

timcs

Member since 27 May, 2016

None one is following timcs yet!

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies