timcs's Forum Posts

  • Yes, I'm talking about editing the file that contains the text data It's a good idea to make a copy first

    You could also use Notepad++ which is entirely free, I mostly use SublimeText out of habit ^^

    Ratmaster - That worked using notepad++ by converting the file to UTF-8 saving it and then zipping up the folder to load into phonegap once built and installed, the French "accents" (I am sure you will correct me on that terminology ) are now showing.

    Thank you for this RatMaster, it is just a case of remembering this when exporting the project next time if I add to this file or any other of these.

    Now to continue with this project which has become quite a challenge

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When exporting your project, you get a "www" folder, and in it you will find the "index.html" file

    When you open it with a text editor such as SublimText, you will see the line "<meta charset="UTF-8" />" which is equivalent to what I wrote before (but you can still try to replace it, it might maybe help on some browser)

    It seems Construct2 already encoded the file in UTF-8, so it's more probable there is a problem with the encoding of the text file you read with ajax, so you should try saving it with another encoding

    In sublimText2, you use "File > Save with encoding" and you select your encoding (here UTF-8) It might mess up every accent in your document though, but it's the only way. (this software exists in a trial version you could use if needed)

    I'm not an expert but I'm pretty sure the problem comes either from the fact that the web page's encoding is wrong and can't display the characters correctly, either from the fact that you try to load text from a file with ANOTHER encoding and the characters are not converted properly ^^' To avoid this kind of problem, you should always use the same character encoding in every file

    Ratmaster

    I firstly tried your inital suggestion with adding the html tag to the index.html with and without the existin meta tag line created by Construct 2 but that did not work.

    On your second suggestion, are you refering to editting the file that containts the text data that has the language held in it? If so I will copy it first and try SublimText2 , also is this the only type of editor , as in is there a free one, that could do this?

  • Hi,

    I think the problem comes from the bad character encoding in your web page (the html document). Try using this :

    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

    If needed, modify the html file with a text editor such as Notepad++ or SublimeText and select "UTF8 without BOM" to make it work.

    If this is not the solution, I really don't know how to help you ^^'

    Ratmaster thank you for your repy, where would I add this within the project files as when I build this project for Android and run it on an Android device it does the same thing. I am using phonegap to build this if that makes any difference.

  • Hi

    I have been working on a personal project for myself to help me with learning French at the moment, when I copied a series of text data straight into the list properties within Construct 2 , the text displayed correct in French even when some of the letters had the various "accents" on them

    Howver I have just spent some time reading in a text file using ajax and formating the separaters etc but when I feed the text data into a Text Label (Not an edit Text box) the "accents" show up as a diamond character. Does this mean that ajax is unable to handle these types of characters?

  • When you duplicate a layout, you are making copies of the instances of object types that are present in that layout.

    So it is natural that renaming an instance of the object type in the duplicated layout ends up renaming the object type in the original layout since it is a single object type all along.

    And referring to the name of instances in the event sheet is all fine and one of the strengths of Construct 2.

    When using an event sheet applied to a layout, the events only apply to the instances of that layout.

    The interest of duplicating layout is to be able to use a common event sheet.

    Generally, you will have a "Common" event sheet containing mechanics that are common to all your layouts.

    For example, clicking on a button and possibly having a callBack from there.

    Then, specific event sheet for each layout will be created (containing the specific callBack for each layout) and including the common event sheet.

    At last r241 is a beta release the link of which can be found at the bottom of any page of the website and in this page.

    See this example made in r241.

    Kyatric

    Thanks for your detailed reply on this I presume the idea is to have one layout (which is what 99Instances2Go was saying) and then change the behaviour of the buttons etc depending on what they do etc.

    However being a little old fashioned for this project only I will probably stick with what I am doing.

    Thanks for the link to the beta release and the link for the example

  • 99Instances2Go Thanks for your input I have currently decided to take the only route I know for now to get this project up and running, if I had more time to work out the methods you have kindly mentioned here I would. The reason for the deadline is that I need to get this self teaching working fast so that I can focus on learning something else as well!

    Construct 2 has been a great game maker for me as I have tried many other game makers and found this to be the best.

    Oh and I do not think you went that off topic my originaly post was based on trying to get a copied layout to work on its own.

    Thanks again 99Instances2Go for your help

  • 99Instances2Go

    How do I clone objects from one layout to a new one ? secondly the goal here is to create a "template" of an original layout and use its design with others. So these layouts are menus , they will all look alike apart from the Menu title,button/sprite labels and what actions are trigged when they are touched/clicked on.

    As this is the case, I was trying to simplify the creation of the layouts to speed up creating my project .

    I am not sure what you mean by refer to it as an instance variable, it could be that I was not clear with my goal on what I am trying to do so sorry if I have mislead you on this.

    The project is mearly for my personal use as I am learning a spoken language and felt that if I put what I am learning into an app/game format it will help me with my progress .

  • 99Instances2Go My problem here is that I need the objects to be separate as if I refer to the object by its name would this not conflict ? The idea being is to make a complete clone of the original layout and have it clone all of its objects as well .

    Does this mean I would have to re-create the second layout manually ?

  • Yep created a new project copied the layout 1 to layout 2 and the objects are not newly created for layout 2 so when I then rename the e.g. "text" object on the new layout (layout 2) it renames the object on the original layout as well.

  • I think I have found the issue, it is when you rename the object on the new layout after it has been copied. I am going to test this on a new project to see if it happens then. It appears fine when the layout has been copied but as soon as I renamed the new object to something else it seems to change the same object on the original layout as well and then they both have the same UID

  • zenox98 I will upload a capx file for this, however the release you have is this just a testing release and not a public release ?

    ** EDIT **

    Now I feel embrassed as I have tried to re-create this on this release and cannot I know it was definatley happening because everytime I change the object name on the new layout, it kept changing it on the original and the UIDs were the same aarrrrrrghhhh.

    Sorry to waste everyones time

  • You will need to provide a .capx as requested in the Bug Report Requirements, especially as I have just tested this on r241 and UIDs are definitely unique and not duplicated on new Layout.

    OK Do I have have access to this version or has this not been released ?

  • Problem Description

    When choosing to duplicate a layout and create a new layout from this, the objects within the new layout have the same UID as the original

    Steps to Reproduce Bug

    • Step 1 - Right Click on a layout in the object inspector and click duplicate
    • Step 2 - Give the new layout a different name and then check the UIDs for the objects and they will be the same as the original.

    __

    Expected Result

    That the UIDS are unique for the new layout

    Operating System and Service Pack

    Windows 10 pro 64bit

    Construct 2 Version ID

    release 239 (64bit)

  • 99Instances2Go that is what I have tried and the UIDs remain the same on both layouts

    Ashley Ok thanks for this

  • Hi

    I have read this thread : and searched avidly on this forum for an answer but I have struggled to find what I am after.

    Basically I need to copy/clone the structure of a layout from one scene to another but when I do this with duplicate or copy and paste, the UIDs of the original objects remain the same for the newly copied objects which means that when I change the object name on the newly copied version, it renames the object name on the existing version.

    Is there an easy way of doing this or would I have to keep adding and layouting the same structure on the new layout ?